NextGen gallery effects not working

by Jonathan | Jul 15, 2009 at 1:00 pm | Featured, web design

NextGen Screen Shot

After doing some redesigning on this site I noticed that my NextGen gallery effects (ie. thickbox, lightbox) stopped working. When you clicked on an image it would link you directly to the jpeg image. I was getting very frustrated but after some research it turns out I was missing a very important line of code in my footer. I needed to add the php line “wp_footer();” to my footer file.

From WordPress Theme Development Page:

Goes in the “footer” of a theme; footer.php template. Example plugin use: insert PHP code that needs to run after everything else, at the bottom of the footer.

Usage: <?php do_action('wp_footer'); ?>
-or- <?php wp_footer(); ?>

This creates a space for wordpress to add code into your footer. NextGen gallery adds the thickbox javascript links in the footer so they are called at the end of a page load. If you are having the same problem try added the footer code to your theme.

  • This worked perfectly for me! Thanks for sharing.

  • I had the same problem and it had to do with a line of code that was left out of my header. So if you are having this problem, check your header and footer files to make sure all of the code is there. Maybe compare to the default template.

    Good luck.

  • Thank you so much! I was looking everywhere for this!

  • Thanks for this. Sadly didnt work for me. Its weird. If I use a theme which works on other sites I am still not getting the gallery to work properly.

    Not sure what I have done but it has been driving me crazy! Thumbnails arent being created automatically either.

  • Wow. Thanks! I thought I was going to have to spend a lot of time troubleshooting this.

  • Andrea

    Thanks! This was driving me crazy!! What a simple fix.

  • Thanks! I should have known better than to delete that code from the footer, but I never would have guessed that was causing the problem. You saved me from many hours of tearing my hair out!

  • Thanks for sharing but Lightbox still not working