• Hi all.

    I think the NextGen Gallery is great, but the lightbox effect doesn’t work. I built my own custom theme from the ground up, and I’m thinking I’m missing some code or something.

    When I switch to the Twenty-Fourteen theme for example I notice that the lightbox effect does work.

    So how can I make the lightbox effect work with a custom built theme?

    Any help is appreciated.

    Regards -S

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 9 replies - 1 through 9 (of 9 total)
  • @sjtr, probably you missed the wp_footer call in your template

    Thread Starter SJTR

    (@sjtr)

    Thanks for your reply.

    I’m not sure where to put that. Nor do I understand its purpose even after reading up on it on the WordPress Codex (which has always been unclear to me).

    I do have get_footer in my pages. Not sure if that’s about the same thing?

    Regards -S

    @sjtr, you have to put <?php wp_footer(); ?> immediately before </body> tag. I can’t tell you where you have to put it (in which template file), I assume you know it since you did the theme.

    Thread Starter SJTR

    (@sjtr)

    Hey,

    I added that to my footer.php. It’s the only file that closes the body. Now the admin bar is showing when viewing the website.

    However, it doesn’t seem to change anything else. I’m running localhost so I can’t post the URL, but if you require any specific code to look at I can post it.

    I’m not sure where to go from here.

    Thanks, regards -S

    @sjtr, any other lightbox effects (shutter, fancybox, etc.) isn’t working at all? Try one of them, but you may also need to clear the browser cache.

    Edit: check wp_header call too

    Thread Starter SJTR

    (@sjtr)

    Hey,

    so I tried the other options; only Highslide and Shutter are working for me.

    After as well adding <?php wp_head(); ?> just before the </head> tag lightbox worked for me! So do all the other ones.

    Only weird thing is – and it it’s a little off-topic – the arrangement of the images with lightbox is confusing. Sometimes it says image 1/8 but when you click on the image the next image isn’t loaded, it just closes it. And when you click on the 4th image for example you can click through all of the 8 images in a row which is weird as well.

    Shutter doesn’t have this problem though, unless you might have a solution for this little thing I think I’ll stick to Shutter.

    Thanks again.

    Plugin Contributor photocrati

    (@photocrati)

    @sjtr – The “issue” with the “Lightbox” Lightbox effect is a known one for that library (which we include as a convenience).

    As to the rest of the concerns, is there any way for you to put the site onto a remote server so we can have a look at it … and to ensure this is not a local environment only issue.

    Thanks!

    – Cais.

    PS: Thanks @tizz.

    tizz you’re awesome! I could kiss you ??

    I had the exact same problem and have been trying to fix it for days trying out every advice. It couldn’t have been easier!!!

    I added <?php wp_footer(); ?> to footer.php file in my custom theme before the </body> tag and bam!

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

    Thanks a lot!!!

    Plugin Contributor photocrati

    (@photocrati)

    @melyssa – Thanks for your feedback!

    @tizz – Thanks, again, for your help, too.

    – Cais.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Lightbox effect not working – code needed? [Custom Theme]’ is closed to new replies.