Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

NextGEN Gallery not finding its javascript when using child theme WordPress

  • SOLVED

I'm quite new to making themes, and maybe I've missed something obvious out...

http://gluestixhairextensions.co.uk/site/galleries/

The images aren't loading with the lightbox effect with this custom theme I've made.
When I use twentyten as my theme, the nextgen gallery lightbox works fine.

What am I missing? I have tried:

Hardcoding the calls to the NGG javascript files in the header, after copy/pasting them out of the sourcecode when using twentyten theme.
Changing permissions on all NGG folders to 755
Playing with every single setting in NGG

Can anyone tell me what my (admittedly amateur) theme/code is missing, and how I can reunite NGG with its javascript? Thankyou!

Answers (2)

2011-03-19

Peter Michael answers:

Use stylesheet_directory instead of template_directory

Also see [[LINK href="http://codex.wordpress.org/Function_Reference/bloginfo"]]http://codex.wordpress.org/Function_Reference/bloginfo[[/LINK]]

2011-03-20

AdamGold answers:

http://gluestixhairextensions.co.uk/site/galleries/
Doesn't work, do you mean http://gluestixhairextensions.co.uk/site/index.php/galleries ?

Anyway, I can't see any call for the lightbox javascript file. I don't know if it's the way it should be with NextGEN (haven't worked with this plugin..) but try something like this in your functions.php:

function yourtheme_run_scripts() {
wp_enqueue_script('thickbox');
}
add_action('init', 'yourtheme_run_scripts');


By the way, you are calling the jQuery library twice.