I am using the NextGen gallery WordPress plugin for a site. In my gallery.php template I want to retrieve the number of images for each gallery displayed in the loop. I cannot figure out a way to get the data and print it under the thumbnail of each gallery that's called in gallery.php
Here is where I want to insert the gallery image count and print it:
<?php
global $wpdb;
$images = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures") ); ?>
<a rel="prettyPhoto" href="<?php echo $image->imageURL ?>" <?php $image->thumbcode ?>>
<span>view</span>
</a>
<?php echo $images; ?> pictures
$images
just useecho count( $images )
. However if you are listing all galleries without being in an albumn and want to show the number of images I will have to do some more digging.