WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with a slightly customized version of the album-compact.php template. I have pretty much just organized the look and feel. I haven't messed with anything else.

I have an album listed on a page through the do_shortcode template tag, and want the gallery thumbnail to open a lightbox instead of a new page.

<div class="ngg-album-link">

                jQuery(".Link").colorbox({href:"<?php echo $gallery->pagelink ?>"});    
            <p><a class="Link" href="<?php echo $gallery->pagelink ?>">
                <img class="Thumb" alt="<?php echo $gallery->title ?>" src="<?php echo $gallery->previewurl ?>"/>

            <div class="current_gal">
            <p class="gallery_desc century"><?php echo $gallery->galdesc ?></p>
            <p class="gallery_title_link">
                <a class="Link event_archive_link palatino" href="<?php echo $gallery->pagelink ?>">                    
                    <?php echo $gallery->title ?>


This does nothing at all. the site is at seattledesigndistrict.com/events/

any ideas?

share|improve this question
Ok so I got this working halfway; I now have the colorbox openning but because I am using <?php echo $gallery->pagelink ?> its opening the page containing the slideshow. I need it to just open with the images... the fix was to edit: $('a.gallery').colorbox({href:"<?php echo $gallery->pagelink ?>"}); to include the a.gallery – tjsherrill Mar 3 '11 at 18:05
  1. Under Gallery Settings, set "Number of images per page" to 1.
  2. Then check the box for "Add hidden images." This should display just the first thumbnail in you gallery, and when you click on it, you can navigate through them in a lightbox.
  3. Then you have to remove the page navigation at the bottom of that first thumbnail. There are a couple ways to do this, but the one I used is below. Locate /plugins/nextgen-gallery/nggfunctions.php Before you make any changes, you may want to make a copy of the unmodified file for later. Find the both instances of the code below and edit.

    // check for page navigation if
    ($maxElement > 0)

change to

    // check for page navigation if
    ($maxElement > 1)"

This will make it so that the page navigation only kicks in if you have more than one image per page (what we set in step 1).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.