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

Can i do a Lightbox effect on a template page that is static? WordPress


I'm not sure if the fact that i'm using a child theme is the issue; or if because i'm using page templates that are not running the WordPress loop. I am hardcoding all the page content onto the template files for the site and simply creating pages in the CMS. Thus, the images are hardcoded into my template files.

I tried to combine the use of a lighbox plugin. that didn't work either. i was only able to get 1 image to have the lightbox on it at a time. not a series of images w/ navigation arrows, which is what i need.

i don't have a functions php file in my child theme.

here is one of the pages where i want to have the lightbox effect.

these are some the resources i exhausted:

jQuery Lightbox For Native Galleries
NextGEN Gallery

Answers (5)


Roberto Mas answers:

it works with jquery colorbox


if you nedd more help pm me


Matt K answers:

Since you're hard-coding the pages as WordPress PHP page templates, I would use Lightbox (or whatever JS effect) separately. Just upload the files to a directory and reference them on the pages/CSS?


Erez S answers:

You may use lighbox directly through the code,I mean to take this plugin:
Put this in your head tag:
<script type="text/javascript" src="js/jquery.lightbox-0.4.js"></script>
And then add to all the images you want class "lighbox" and add this in your <script> tag in the head tag:
$(function() {
$('#gallery a').lightBox({fixedNavigation:true});

This is supposed to work

Erez S comments:

BTW,don't forget to change the source url of the lightbox script in the first script tag:
<script type="text/javascript" src="js/jquery.lightbox-0.4.js"></script>
To whatever you need


Monster Coder answers:

First you need to add jquery and lightbox js files.

I see you added lightbox file but I guess reference is not correct.
<blockquote><script type="text/javascript"


add this file reference correctly.

then activate the lightbox for images
jQuery(document).ready(function (){
jQuery('.imageRow > img').lightBox();


paul de wouters answers:

Wordpress already includes thickbox, so you can call it from functions.php :

or have you tried this plugin : [[LINK href=""]][[/LINK]]