NextGEN gallery slideshow giving error

1.6k views Asked by At

I've installed the latest version of NextGEN gallery (version 2.0.40). All other options like Basic Thumbnails, Basic ImageBrowser, Basic SinglePic are working fine but when I tried to create a Basic Slideshow then it's not working! I can only see the slideshow loading icon but no slideshow images. This is how I called the gallery to a page:

<?php echo nggShowSlideshow(1,300,200); ?>

I've check the error console & its shows following error:

TypeError: jQuery(...).nggShowSlideshow is not a function


timeout: 10000      });

I've searched for solution of this issue & some people suggested to change this:

jQuery(function($){
        jQuery('#<?php echo_h($anchor); ?>').nggShowSlideshow({
            //code here
        });

with this:

jQuery(document).ready(function($){
        jQuery('#<?php echo_h($anchor); ?>').nggShowSlideshow({
            //code here
        });

but it didn't worked for me! By the way, my Wordpress version 3.7.1.

Any ideas? Thanks.

2

There are 2 answers

0
neshpro9 On BEST ANSWER

This is kinda odd to answer my own question, but I want to state my findings here so that it might be helpful to others!

What I've figured out is, footer was missing in my page-templates! As most of the wordpress plugin's javascript files are being called through footer so if you miss <?php get_footer(); ?> in your page-templates then you may get such error like TypeError: jQuery(...).nggShowSlideshow is not a function! I've missed footer while working with custom page-templates.

0
Flocke On

This thread is old but I think it is necessary to add a small remark to the answer:

Don't call get_footer() if you don't need the footer. This function adds the footer-template to the output. I think there may be a good reason why there isn't a get_footer()-call in your template (or another template).

Basically, you are missing wp_footer(). Calling wp_footer() at the end of your body-tag us doing the job:

<body>
...
<?php wp_footer(); ?>
</body>