I can get the image to appear fine in this bit of gallery code. However the flex slider gets its caption from a <p>
tag (class="flex-caption"
) and I just need to echo
out the image title inside that paragraph.
<?php if (!empty($flex_gallery)) {?>
<div class="flex-container resize-620">
<div class="flexslider">
<ul class="slides">
<?php
foreach ($flex_gallery as $att) {
echo ( '<li>' . wp_get_attachment_image( $att , 'blog-full-width' ).
'</li>
<p class="flex-caption">' . I NEED JUST THE IMAGE TITLE HERE . '</p>');
}
?>
</ul>
</div>
</div>
<?php } else { ?>
<?php the_post_thumbnail(
'blog-full-width',
array('class' => 'featured-full-width-top'));
?>
<?php } ?>