I just found out about the [ nggtags ]
shortcode earlier today, and I was having the same frustrating results with some tags not generating a gallery.
As an aside, clintonb made a good point in that NextGen Gallery doesn’t do us the courtesy of some sort of an HTML comment along the lines of “Nothing found…”, so that we can see the shortcode is at least being recognized. A good plugin should allow users to test results. The File Gallery plugin does that, and my hat’s off to them.
Anyway, I got to thinking about the relationship between tags and slugs. Using PHPMyAdmin, what I found was that I had several post tags (taxonomy=”category” in the wp_term_taxonomy
table) that had the same name as tags I put on my images (taxonomy=”ngg_tag” in the same table). I browsed the WordPress table wp_terms
and discovered that my media tags that had the same name as the post tags had a “-2” appended to them.
For example, my media tag of “kitchen”, which already existed as a post tag, was changed to “kitchen-2” as the slug. Apparently, NGG is using the slug and not the tag to generate an nggtags
gallery.
After some cleanup (I deleted my post tags and got rid of the “-2” on my media tags because I’m at an early enough stage to where I don’t really have any posts – if you do have a lot of posts, you’ll want to find out what the actual slug is for your media tag and use that slug as your nggtags gallery=
parameter) everything is working beautifully.
I’m developing locally right now, so I can’t give an example.
My only regret is that the NextGen GalleryView add-on plugin does not work with the nggtags
shortcode. If I get time, I’ll look into that and post some PHP mods… but that’s a separate topic.
Hopefully this fixes someone’s problems! Good luck. ??