[Plugin: NextGEN Gallery] Displaying image tags, I have it outputting but want it in lightbox
-
Hi all,
While tweaking my site and enhancing navigation, I’ve come across code that has enabled my images’ tags to show, as clickable search links no less!
The code I’ve found in this post (modified from’tag/’ to ‘?s=’) is:
<!-- START TAG DISPLAY ON EACH IMAGE--> <?php $tags = wp_get_object_terms($image->pid,'ngg_tag') ?> <?php foreach ( $tags as $tag ) : ?> <a href="<?php bloginfo('url'); ?>/?s=<?php echo $tag->slug; ?>"><?php echo $tag->name; ?></a> <?php endforeach; ?> <!-- END TAG DISPLAY ON EACH IMAGE -->
If inserted in gallery.php like this
<!-- Thumbnails --> <?php foreach ( $images as $image ) : ?> <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> > <div class="ngg-gallery-thumbnail" > <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> <?php } ?> </a> </div> <strong> <!-- START TAG DISPLAY ON EACH IMAGE--> <?php $tags = wp_get_object_terms($image->pid,'ngg_tag') ?> <?php foreach ( $tags as $tag ) : ?> <a href="<?php bloginfo('url'); ?>/?s=<?php echo $tag->slug; ?>"><?php echo $tag->name; ?></a> <?php endforeach; ?> <!-- END TAG DISPLAY ON EACH IMAGE --></strong> </div>
I get all my tags neatly outputed next to the gallery thumbnails (like this pic shows). When clicked, they work with the NextGen Search Engine plugin and deliver all photos tagged appropriately.
Please, anyone know how to get these tags into a Lightbox viewer output ,for example under the image description? I use prettyPhoto, if that affects any big bit of reply.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin: NextGEN Gallery] Displaying image tags, I have it outputting but want it in lightbox’ is closed to new replies.