WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Disable Fancybox on individual images (6 posts)

  1. Jay Collier
    Member
    Posted 3 years ago #

    I have several images I wish to allow to open directly.

    How do I disable Fancybox for those photos?

  2. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    There is no way to disable FancyBox for only a few images while leaving automatic attachment ON for every other image... You will need to switch the Auto-enable option OFF ( Admin > Settings > Media ) and manually enable it for those images that you DO want FancyBox to work on.

    This is done by giving all the links that you want to open in a FancyBox overlay, a class name specifically for FancyBox. Class names you can use are:

    • "fancybox" for images
    • "fancybox-swf" for Flash files
    • "fancybox-youtube" or "fancybox-vimeo" for movie site pages
    • "fancybox-pdf" for PDF files
    • "fancybox-iframe" or "fancybox iframe" for web pages

    To give you an example with class="fancybox":

    <a href="/big.img" class="fancybox" rel="gallery" title="Image title"><img src="/thumbnail.img" alt="Image title" /></a>

    Notice the rel="gallery" ? If you have multiple images in your post and want to show them in a FancyBox gallery then you will need to give them all a similar rel name. The name choice is yours and you can group images in different gallery groups by using different rel names...

  3. Jay Collier
    Member
    Posted 3 years ago #

    Thank you for the info, Ravan.

    I do, indeed, want to have FancyBox load in 98% of cases. In the others, I have images I want to load full-screen so they can be viewed in detail.

    So, I have a request for a future update. A similar plugin (but for Thickbox) does this: if an image has a specific class ("nothickbox"), then the filter isn't invoked. That way the class can be added for the few exceptions.

    If you added such as feature, your plugin would immediately be a 5-star in my book.

    In any case, thank you for your work. My clients' user experiences are greatly improved due to your plugin.

  4. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    i will consider it for the next update :)

  5. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    J, in the new version 1.3.4.6 there is class nofancybox for excluding individual links. :)

  6. Jay Collier
    Member
    Posted 3 years ago #

    Yours is now definitely the best light/fancybox plugin.

    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic