I would like to style the image caption only if a caption exists for the image i.e. enclose it in a div. Any idea how you do an “if caption exists: statement for the Gallery field?
Okay, I’ve figured this out:
<?php if( $image['caption'] ): ?>
<div class="caption"><?php echo $image['caption']; ?></div>
<?php endif; ?>