WordPress.org

Support

Support » Plugins and Hacks » [Plugin: FancyBox for WordPress] Disable Fancybox on certain pages

[Plugin: FancyBox for WordPress] Disable Fancybox on certain pages

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would also like to disable fancy box on certain pages. Did you ever solve this problem?

    Thanks

    I’ll look into this for future versions.

    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″ / >

    thecodezombie

    @thecodezombie

    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.

    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. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: FancyBox for WordPress] Disable Fancybox on certain pages’ is closed to new replies.
Skip to toolbar