Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » Display image name under thumbs

Viewing 3 replies - 1 through 3 (of 3 total)
  • Firstly, move the NGG templates into a new directory called ‘nggallery’ inside your theme. This will prevent them from being overwritten the next time NGG updates.

    To show the description for the image, put this piece of code inside the foreach loop outputting the images in the gallery template:
    <?php echo $image->description; ?>

    If it wraps, it’s because there isn’t enough horizontal room to fit the text. You will need to tweak your template/css to accommodate the text in that case


    Thx for your answer.

    If I move the templates into another location, Wp wont find them anymore? If I upload them right into NGG it puts them automaticly in the gallery folder. How do I do that please?

    About the code. I opened the gallery.php and put the code in the foreach loop:

    <!-- Thumbnails -->
    	<?php foreach ( $images as $image ) : ?>
    	<?php echo $image->description; ?>
    	<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 } ?><?php echo nggv_imageVoteForm($image->pid); ?>
    	<?php if ( $image->hidden ) continue; ?>
    	<?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
    		<br style="clear: both" />
    	<?php } ?>
    <?php echo $image->description; ?>
    <?php endforeach; ?>

    [Please post code between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

    This does not put the names of the images back under the image as before the update? Am I doing something wrong?



    Just letting you know that the names are back under the images now.
    Thx for your help!


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display image name under thumbs’ is closed to new replies.