Do you want to display the IMAGE TITLE and/or the IMAGE DESCRIPTION? (READ)
-
Do you want to display the IMAGE TITLE and/or the IMAGE DESCRIPTION below your gallery images? I found the answer a very common issue of displaying the image title and/or description.
If you go to the plugin folder nextgen-gallery/view/gallery.php
Step 1: Find the code:
_________________________________________________________<!-- 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>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> </div>
___________________________________________________________
Step 2: Replace above code this the following code<!-- 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>imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> <img title="<?php echo $image->description ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> <?php } ?> </a> <span><?php echo $image->alttext ?></span> <span><?php echo $image->description ?></span> </div> </div>
______________________________________________________________
Note:
This is the code to add the description
<?php echo $image->description ?>
This is the code to add the title
<?php echo $image->alttext ?>
- The topic ‘Do you want to display the IMAGE TITLE and/or the IMAGE DESCRIPTION? (READ)’ is closed to new replies.