Adding [ nggallery id=1 template=caption ] makes the title/description show up in the slideshow for me, but not the thumbnails. Does anyone no how to make the caption show up under the thumbnails?
Thanks
Thread Starter
benz1
(@benz1)
That works for the gallery thumbnails for me but not if you use [ slideshow id=1 template=caption ] if just using the slideshow.
I have found the solution!
Put the caption that you want in the description box (not the title line) next to the image in the Manage Gallery section.
Then insert this:
[nggallery id=1 slideshow=caption].
To show captions for the thumbnail and slideshow:
[nggallery id=1 template=caption] and still put the title in the description box.
Thread Starter
benz1
(@benz1)
Thanks for the tip but unfortunately it didn’t work for me 🙁
This issue has been bothering me for a while so I started digging into the code for this plugin. In the ‘shortcodes.php’ file all the shortcodes that accept the template attribute have code similar to this:
function show_imagebrowser( $atts ) {
global $wpdb;
extract(shortcode_atts(array(
'id' => 0,
'template' => ''
), $atts ));
$out = nggShowImageBrowser($id, $template);
return $out;
}
The slideshow shortcode doesn’t have that attribute:
function show_slideshow( $atts ) {
global $wpdb;
extract(shortcode_atts(array(
'id' => 0,
'w' => '',
'h' => ''
), $atts ));
if( !is_numeric($id) )
$id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' ", $id) );
if( !empty( $id ) )
$out = nggShowSlideshow($id, $w, $h);
else
$out = __('[Gallery not found]','nggallery');
return $out;
}
I don’t have a test environment to try adding the code in myself, can someone else try adding the code and see if that returns the template functionality to the slideshow? Or am I way off track here? (PHP is not my strong point)