WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: FancyBox for WordPress] Disable Fancybox on certain pages (6 posts)

  1. Isaak Wells
    Member
    Posted 4 years ago #

    How can I disable fancy box on certain pages of my website. My forum already implements a pop up for images and everytime someone clicks an image two pop up.

    http://wordpress.org/extend/plugins/fancybox-for-wordpress/

  2. DeepFried
    Member
    Posted 3 years ago #

    I would also like to disable fancy box on certain pages. Did you ever solve this problem?

    Thanks

  3. José Pardilla
    Member
    Posted 3 years ago #

    I'll look into this for future versions.

  4. gleroy1
    Member
    Posted 3 years ago #

    One way to get around this (sorry if this isn't exactly what you're looking for) is to just make all images on a given web page 'unlinkable'.

    In other words if you remove the anchor/hyperlink tags from around the images, those images won't be affected by the fancy box code.

    Example:

    For all images on a given web page, just change something like this..

    < a > href="http://www.geraldleroy.com/wp-content/uploads/2010/10/movie-depot-lg.jpg" > < img src="http://www.geraldleroy.com/wp-content/uploads/2010/10/movie-depot-sm.jpg" alt="" title="movie-depot-lg" width="300" height="180" class="aligncenter size-medium wp-image-185" / > < / a >

    to this..

    < img src="http://www.geraldleroy.com/wp-content/uploads/2010/10/movie-depot-sm.jpg" alt="" title="movie-depot-lg" width="300" height="180" class="aligncenter size-medium wp-image-185" / >

  5. thecodezombie
    Member
    Posted 3 years ago #

    To be honest, I think everyone should look into stopping Fancybox loading on certain pages. It loads scripts, CSS and images everytime, but in retrospect the majority of scenarios only need them for 'posts'. From an optimisation perspective, it's not great for load-times / bandwidth etc.

    At the moment, I'm wanting to switch off Fancybox for category pages; because it's disrupting a script I wrote.

    I think it's something to do with this:
    http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts/

    But I can't be sure until I read into it properly...I'll let you know how I get on.

  6. dubsnipe
    Member
    Posted 3 years ago #

    Aw, too bad I can't do it manually. I wrote one of those feature sliders for my site, and fancybox just stops the animation altogether, some sort of conflict that beats my non-mad skillz.

    Given that I've already loaded a LOT of scripts on my index page, I figured preventing fancybox from loading on my front page would be the solution.

    I'll just have to wait for a future version then. :)

Topic Closed

This topic has been closed to new replies.

About this Topic