• Resolved Adrian

    (@locka)


    I was going to use simple lightbox plug-in however this is not responsive so I’ve looked to switch to “responsive lightbox” by dfactor.

    This however does not want to work with the galleries I believe this is because it looking for a rel selector on each of the images default being “lightbox” now if I was to select one of my images and just add this to a a page it works fine as that image gets rel select “lightbox-0” which works fine.

    I was hopping to locate where the line is with in your code that produces the html line for the image and just add in rel = “lightbox” however I cannot find it.

    Any idea where might put this the responsive gallery template has this line “echo $attachment->html( $args );” which obviously generates html line but I’m unable to find where this code is.

    https://www.ads-software.com/plugins/foogallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bradvin

    (@bradvin)

    instead of modifying the code, rather add a bit of code to your functions.php file for your theme:

    add_filter(‘foogallery_attachment_html_link_attributes’, ‘add_foogallery_link_rel’, 10, 3);

    function add_foogallery_link_rel($attr, $args, $attachment) {
    $attr[‘rel’] = ‘lightbox’;
    return $attr;
    }

    Thread Starter Adrian

    (@locka)

    Thank you that worked a treat, I’m really still learning how to code especially in wordpress. thanks again

    Added this code using Code Snippets.

    Instead of a lightbox, it shows a full screen page with arrows and no photo. Clicking on an arrow will make a picture appear, but not all.

    Are you sure this is the right code for dFactory Responsive Lightbox?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘issue with responsive lightbox not working.’ is closed to new replies.