WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Fancybox for WordPress] Multiple Galleries on One Page (2 posts)

  1. jaeeun
    Member
    Posted 2 years ago #

    Hi,

    When I add multiple NextGen galleries to a page and I view them via Fancybox, they don't end after each gallery. The user is able to scroll through all the NextGen Gallery images on that page as if they were all part of the same gallery.

    Does anyone know how this can be changed to show only per gallery?

    Thank you,

    Jaeeun

  2. lxg
    Member
    Posted 1 year ago #

    I had the same issue today, I solved it like this: On the plugin settings page, go to the “Galleries” tab and select “Use a custom expression to apply FancyBox”. Then paste the following code into the textarea:

    var gCount = 0;
    jQuery('div.gallery').each(function(k, $gallery){
        ++gCount;
        jQuery(thumbnails).each(function(k2, thumb){
            var $thumb = jQuery(thumb);
            if ($thumb.closest($gallery).length)
            {
                $thumb.addClass("fancybox").attr("rel","fancybox"+gCount).getTitle();
            }
        });
    });

    NB: There are dozens of forum post related to this issue, however they relate to different implementations of Fancybox plugins for WP. This fix refers only to the “Fancybox for WordPress” plugin found at http://wordpress.org/extend/plugins/fancybox-for-wordpress/.

    Sorry for digging up a 7 months old post, but this issue seems to bother quite a lot of people, so I thought a fix might be helpful.

Topic Closed

This topic has been closed to new replies.

About this Topic