Right now, I'm inserting a gallery into a post directly via the template file. However, some posts don't have galleries.
Here's what I've got now:
<h2>Gallery</h2>
<?php echo do_shortcode('[gallery option1="value1"]'); ?>
Is there any way that I can make the <h2>Gallery</h2> not show if there's no gallery?
I searched the codex, but there doesn't appear to be any if_gallery functionality. Any thoughts?