FancyBox for WordPress
Bug Report: FancyBox makes galleries of all thumbnail images (6 posts)

  1. Delete Me
    Posted 5 years ago #

    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.

  2. Delete Me
    Posted 5 years ago #

    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:


    The correct query for single posts should be:

    var posts = jQuery('.post');
    		posts.each(function() {
  3. -bene-
    Posted 5 years ago #

    Yay, works great now, thanks! :)

  4. Delete Me
    Posted 5 years ago #

    You're welcome!

  5. ohburnie
    Posted 5 years ago #

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

  6. Delete Me
    Posted 5 years ago #

    You're welcome! :-D

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FancyBox for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic