Solution for the Lightbox vs Featured Content Gallery conflict in Wordpress

November 15th, 2009 | 9 Comments | | Posted in Web Development & Design

vs

I had a big issue on getting Featured Content Gallery [FCG] wp plugin (slide show) in to work after installing Lightbox on my wordpress blog . Finally i found a best fix for this after spending some time on the google.

The problem was, the featured content gallery does not appear in the home page, Post view etc., but it works well on other pages (page2, page3…).

If i remove the Lightbox code form /wp-content/themes/your_theme/header.php, the gallery works just fine on any page & posts. So its clear there should be conflict when used both plugins together.

A quik search on google reveled that jQuery and MooTools Javascript frame works are conflicting with each other and causing this issue. LightBox uses jQuery framework while Featured Content Gallery uses MoreTools framework.

Fix :

Method 1 : The traditional NoConflict() method

One way to solve this issue is to use the jQuery.noConflict() function :

Take a look this links for detail on how to use this NoConflict solution.

http://www.wpshoppe.com/tips-tutorials/working-together-with-jquery-and-mootools/

Using jQuery with Other Libraries

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

http://wordpress.org/support/topic/280232?replies=5

unfortunately above method did not work for me. the featured content gallary was started to appear on the home page, but it doesn’t load the slide show images.

Method 2 : Finding a best Lightbox alternative

Finally, i decided to give up the lightbox (atleast until they make a fix in future versions)  and switch to a smiler plugin that works. The result was “Fancybox“.

The best think i found with Fancybox is, by default it shipped with the jQuery.noConflict() functionality. The functionally is already activated in the wp admin by default after installation & activation of the plugin. Thank you folks at fancybox !!

Demo (Click the zoom icon below the image)

Installation instructions & Download

That’s it!

I have solved a big problem now and can really keep concentrating on other stuff now.

http://wordpress.org/support/topic/280232?replies=5

Leave a Reply 8017 views, 3 so far today |
Follow Discussion

9 Responses to “Solution for the Lightbox vs Featured Content Gallery conflict in Wordpress”

  1. Muneer Says:

    Nice one zaman,
    I have used light box and hightslide. This look more professional and equal to hightslide. Thank you that you introduced this to me. Carry on……..

  2. zamaan Says:

    your welcome mr.muneer!

  3. Mike Says:

    Awesome, Awesome, Awesome.  I had never heard of Fancy Box. It is now my favorite image plug-in! Thanks!

  4. Craig Watkins Says:

    Thank you so much. I had just built a site and Lightbox updated and whacked out FCG. Then I lost my mind! Thanks for letting people know about this elegant plugin and thanks to FancyBox for making it.

  5. zamaan Says:

    Thanks craig for the comment.

  6. Fauzy Says:

    Hi,

    For those who have edegree theme and FCG Plugin . And the FCG not work, caused of Jquery.

    Just take a simple action with this and it is work. See FCG in my website http://www.mytelecominfo.com

    Action :
    Using the WordPress’s theme editor or directly through FTP, uncomment the 2nd line on this file (edegree/js/functions.js) like this:

    //jQuery.noConflict();

    Then as long as your FCG settings are good, you should be good to go. Let me know if this makes sense.

    Source : http://www.topblogformula.com/support/topic/fcg-not-working-in-edegree

    Hope it’s helpfull :)

  7. zamaan Says:

    Thanks for the tip!

  8. Daedae Says:

    Worked Perfectly! This had been killing me for days , thanks to you i still have all my hair .

  9. zamaan Says:

    cheers!!

Leave a Reply


This site is protected by WP-CopyRightPro