Title: Lightbox effect not working &#8211; code needed? [Custom Theme]
Last modified: August 21, 2016

---

# Lightbox effect not working – code needed? [Custom Theme]

 *  [SJTR](https://wordpress.org/support/users/sjtr/)
 * (@sjtr)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/)
 * 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://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074310)
 * [@sjtr](https://wordpress.org/support/users/sjtr/), probably you missed the [wp_footer](http://codex.wordpress.org/Function_Reference/wp_footer)
   call in your template
 *  Thread Starter [SJTR](https://wordpress.org/support/users/sjtr/)
 * (@sjtr)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074328)
 * 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
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074329)
 * [@sjtr](https://wordpress.org/support/users/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](https://wordpress.org/support/users/sjtr/)
 * (@sjtr)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074331)
 * 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
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074332)
 * [@sjtr](https://wordpress.org/support/users/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](https://wordpress.org/support/users/sjtr/)
 * (@sjtr)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074345)
 * 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](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074348)
 * [@sjtr](https://wordpress.org/support/users/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](https://wordpress.org/support/users/tizz/).
 *  [Melyssa](https://wordpress.org/support/users/lelyssa/)
 * (@lelyssa)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074451)
 * **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](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074452)
 * [@melyssa](https://wordpress.org/support/users/melyssa/) – Thanks for your feedback!
 * [@tizz](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)

 * 9 replies
 * 4 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/lightbox-effect-not-working-code-needed-custom-theme/#post-5074452)
 * Status: not resolved