Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #301729

    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.

    #301880

    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

    #301984

    Wonderful, worked like a charm, thank you very much.

    #302050

    You are welcome, always glad to help :)

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.