I was developing a customize WordPress Theme, as per requirement i have installed NextGen Gallery plugin of WordPress, Plugin was working pretty fine, but when i add gallery in widgebar and pages, i noticed that my NextGen gallery effects (ie. thickbox, lightbox) not working. When you clicked on an image it would link you directly to the jpg image. I was getting very frustrated and done lots of research why it is not working, i make it running by including CSS and JavaScript in header.php of template file, but i want a solid solution for this, after some research it turns out I was missing a very important line of code in theme header.php. I needed to add the PHP code “wp_header();” to header.php.
Add This Below Code in your header.php
<?php wp_head(); ?>
This creates a space for WordPress to add code into your header. NextGen gallery adds the javascript and CSS links automatically there. If you are having the same problem try added the header code to your theme.