Writings, notes, and work of a Boston based designer

NextGEN Gallery not loading CSS/Javascript Oct 1 + 2 comments

written by: ryan coughlin

Is your NextGEN Gallery showing images? But not loading the CSS and Javascript? Find the solution below.

I have been working on this project where the client wanted to be able to upload and install image galleries, so I have worked with this one and I love it: http://alexrabe.de/wordpress-plugins/nextgen-gallery/

All was smooth and working until, I removed this one line of code from my header.php in my WordPress theme directory.

<?php wp_head() ?>

Without this function in your header.php the gallery does not know where to insert the CSS/JavaScript files to create a fully functioned gallery. Be sure that it is placed before your closing tag.

To find out more information on the function check out this

All in all, be sure if you are running any type of plugin where they need to insert code upon plugin creation that you have that line within your head element of the page.

Take a peak at some more?

  • http://lovejoydesigns.net Jenn

    Hi Ryan,

    I am working on this site, http://lovejoydesigns.net and running across a weird problem. My NGG only functions when the page uses the standard header.php template. I need the Portfolio and Featured Products page to match the other pages(which are using templates with custom headers). Currently those pages are stuck on the same template as the Design Lab(blog) portion of the site. If I try to use anything other than header.php on one, the other stops working. Does NGG have some code one has to change in order to recognize a TEMPLATEPATH tag?
    thanks!

  • http://www.tickstudy.com DENNIS

    thanks for the post. it works!

  • http://www.studysp.com study abroad in US/AUSTRALIA/UK

    That is an amazing post! Thanks for that!

  • http://www.bisondesigngroup.com Ivan

    If I add this code in the CSS works. I just added one thing to my main style sheet to override the original. It seems like when I add that code the gallery effects no longer work. I mean the image enlarge effects that grow the thumbnail like Lightbox and Thickbox. Any ideas?

  • http://www.canvasprintsonline.com Canvas Prints

    After moving it to a new server and trying everything I added the nggalley.css content to my style.css of the parent and this eventually worked – thanks for the idea.