logo

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

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/

attachment image View Attachment

sergi | 06/22/10 at 11:33am | Edit


(5) Possible Answers Submitted...

  • avatar
    Last edited:
    06/22/10
    11:39am
    Matt K says:

    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?

  • avatar
    Last edited:
    06/22/10
    1:56pm
    Roberto Mas says:

    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

  • avatar
    Last edited:
    06/22/10
    11:45am
    Erez S says:

    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

    • 06/22/10 11:47am

      Erez S says:

      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

  • avatar
    Last edited:
    06/22/10
    11:45am
    Monster Coder says:

    First you need to add jquery and lightbox js files.

    I see you added lightbox file but I guess reference is not correct.

    <script type="text/javascript"
    src="http://sandbox2.bucktowndigital.com/wp-content/themes/notesblog-core/js/LightboxScript.js"></script>



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


    add this file reference correctly.

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

  • avatar
    Last edited:
    06/22/10
    11:56am
    paul de wouters says:

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

    add_thickbox();


    or have you tried this plugin :

    Previous versions of this answer: 06/22/10 at 11:56am

This question has expired.





Current status of this question: Completed