All you have to do is include the following inside your main WP loop, underneath your featured thumbnail…
<?php $thumb_id = get_post_thumbnail_id($post->ID); $thumb_title = get_the_title($thumb_id); ?> <?php if(!empty(get_post($thumb_id)->post_excerpt)) : ?> <figcaption class="wp-caption-text"> <?php echo get_post($thumb_id)->post_excerpt; ?> <?php $source_url = get_post_meta($thumb_id, 'source_url', true); $parts = parse_url($source_url); if(!empty($source_url)) echo ' (via: <a href="' . $source_url . '" target="_blank">' . $parts['host'] . '</a>)'; ?> </figcaption> <?php endif; ?>
If you aren’t using HTML5, then make sure to use something different than the <figcaption> tag, like a <div> or <span>.