I am trying to create a photography website for myself. I want my galleries with either the masonry portfolio or within a masonry photo gallery. The problem is either one is missing a key aspect to what I need within a gallery.
Using the masonry feature within a portfolio allows me to create categories so I can create a sortable gallery. The problem is every time a visitor clicks on a photo they are taken to a different page. Is there anyway I can make it when the visitor clicks on the image in the masonry portfolio it would open up a lightbox of that image instead of going to another page.
You can see that here……this page is still mostly has the demo content but you will see my photo in the page.
The other option I thought about using was the masonry gallery which includes the lightbox feature. The feature that is missing is being able to make the gallery sortable. Is there a way to make this happen?
I am game for either one of these options. Whatever is easier for you is fine with me.
Hi amolson7!
Open up /enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php and change line 704 from this.
$this->loop[$key]['url'] = get_permalink($id);
To this.
$this->loop[$key]['url'] = wp_get_attachment_image_src(get_post_thumbnail_id($id), apply_filters('avf_avia_builder_masonry_lightbox_img_size','large'));
$this->loop[$key]['url'] = reset($this->loop[$key]['url']);
That will have the masonry element images open in lightbox instead of linking to the post.
Cheers!
Elliott
Thank you so much! That worked!