Tagged: Masonry Entries
Hi,
I’m trying to modify masonry_entries.php to change the default behavior of the masonry for entries.
What I would like is that when I click on the image of the entry, instead of taking me to the referred post, I’d like to show the image (it’s the post’s featured image, of course) in a lightbox. How could I ?
PS.- Please do not suggest using masonry gallery, as for my webpage I need every image to be a post itself.
Thank you, any help would be appreciated.
Hi,
Open /config-templatebuilder/avia-shortcodes/masonry_entries.php and look for line 793:
$this->loop[$key]['html_tags'] = array('a href="'.$this->loop[$key]['url'].'"','a'); //opening and closing tag for the masonry container
Replace it by this:
$this->loop[$key]['html_tags'] = array('a href="'.wp_get_attachment_url($this->loop[$key]['thumb_ID']).'"','a'); //opening and closing tag for the masonry container
Regards,
Josue
Wonderful, worked like a charm, thank you very much.
You are welcome, always glad to help :)
Regards,
Josue