Featured Content Gallery | WordPress Plugin | iePlexus

How To Fix the Infamous empty box

New releases, ideas for the future, and known issues

How To Fix the Infamous empty box

PostBy chriswtburke on Thu May 05, 2011 8:11 pm

When I first tried to set up FCG on my website (chrisburke.ca) I had the same problem that a lot of other people were having.. I was getting the blank box. After watching the install video, it stated that if you have any jQuery plugins, to disable them, and it should work.. tried it.. no success.. mostly because my theme (standard theme - http://tinyurl.com/standardchris) is built on jQuery framework.. so simply disabling a jQuery plugin wasn't going to help... if you have disabled a plugin, and still don't have it working, this is likely the case with you.

After struggling with the issue for about 3 hours, I gave up and posted the question on the support forum for my theme, and this was the response.. it's literally a 5 second fix, and it works great! (all props goes to Michael Novotny from the 8bit support forum)

So this works with an amazingly simple change to the header.php file. But first, an explanation...

What's important to know is that the Featured Content Gallery plugin uses the MooTools framework to do it thing. While this is not in and of itself a bad thing, using multiple frameworks is usually not recommended for instances exactly like this. The jQuery framework, which is included with Standard Theme and included for use with WordPress, is conflicting with the MooTools framework when MooTools is loaded before jQuery. All we need to do is load MooTools after jQuery and it will work. It works with the TwentyTen theme because it doesn't load jQuery (it doesn't utilize it by default).

So, the fix... All you need to do is pop open the header.php file and change this code...

Code: Select all
<?php if ( is_single() ) wp_enqueue_script( 'comment-reply' );
    standard_theme_libs(); ?>
    wp_head(); ?>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/standard.min.js"></script>
    <?php standard_analytics(true); ?>


...to this...

Code: Select all
<?php if ( is_single() ) wp_enqueue_script( 'comment-reply' );
    standard_theme_libs(); ?>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/standard.min.js"></script>
    <?php wp_head(); ?>
    <?php standard_analytics(true); ?>


All your essentially doing is moving the wp_head() function after the standard.min.js (which activates jQuery in the theme) and you'll be good to go!
chriswtburke
 
Posts: 1
Joined: Thu May 05, 2011 8:00 pm

Re: How To Fix the Infamous empty box

Thank you for using the Featured Content Gallery Forum
 

Re: How To Fix the Infamous empty box

PostBy OctoberAbduction on Fri Aug 05, 2011 3:25 am

I am using the Twenty Eleven theme and could not find this code in the header. Is there some other thing I could do? Sorry, I'm just now learning a lot of this stuff and have been doing great with WP for a while - this infamous empty box has me buffaloed though...
OctoberAbduction
 
Posts: 5
Joined: Fri Aug 05, 2011 1:24 am


Return to Development, Improvement, and Conflicts

Who is online

Users browsing this forum: No registered users and 0 guests