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

  • SOLVED

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.

http://sandbox2.bucktowndigital.com/creative-services/print/renaissance/

these are some the resources i exhausted:

jQuery Lightbox For Native Galleries
NextGEN Gallery
WP-Slimbox2

http://leandrovieira.com/projects/jquery/lightbox/

Answers (5)

2010-06-22

Roberto Mas answers:

it works with jquery colorbox

$('button').colorbox({href:"http://sandbox2.bucktowndigital.com/creative-services/print/renaissance/"});

http://colorpowered.com/colorbox/

if you nedd more help pm me

2010-06-22

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?

2010-06-22

Erez S answers:

You may use lighbox directly through the code,I mean to take this plugin:
http://leandrovieira.com/projects/jquery/lightbox/
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

2010-06-22

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"
src="http://sandbox2.bucktowndigital.com/wp-content/themes/notesblog-core/js/LightboxScript.js"></script></blockquote>


<blockquote>http://sandbox2.bucktowndigital.com/wp-content/themes/notesblog-core/js/LightboxScript.js</blockquote>

add this file reference correctly.

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

2010-06-22

paul de wouters answers:

Wordpress already includes thickbox, so you can call it from functions.php :
add_thickbox();

or have you tried this plugin : [[LINK href="http://wordpress.org/extend/plugins/auto-thickbox/"]][[/LINK]]