• I’ve set Fancybox to only make galleries of images within posts, instead it creates a gallery that includes unrelated images located in my sidebar as well. The code it uses does not distinguish between images contained with the post class and images outside of it. Is there a custom query workaround that can prevent this? Otherwise it’s something that would need to be fixed for the next release.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Delete Me

    (@lincolnadams)

    I’ve discovered the reason why it does this: on single post pages rather than using the correct query to only open images within the post class, it instead uses this query:

    jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle();

    The correct query for single posts should be:

    var posts = jQuery('.post');
    
    		posts.each(function() {
    			jQuery(this).find(thumbnails).addClass("fancybox").attr('rel','fancybox'+posts.index(this)).getTitle()
    		});

    Yay, works great now, thanks! ??

    Thread Starter Delete Me

    (@lincolnadams)

    You’re welcome!

    This solves the problem of galleries on the same page but in different posts merging together in one fancybox.
    Thank you!!!!

    Thread Starter Delete Me

    (@lincolnadams)

    You’re welcome! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: FancyBox for WordPress] Bug Report: FancyBox makes galleries of all thumbnail images’ is closed to new replies.