I use the Dispatch Template. As a news magazine, I must provide a copyright notice and some words for each picture. I added the following code:
add_action( ‘generate_before_content’, ‘db_featured_image_caption’, 15 );
function db_featured_image_caption() {
$get_description = get_post(get_post_thumbnail_id())->post_excerpt;
if(!empty($get_description) && is_single() ){
echo ‘<span class=”featured_caption”>’ . $get_description . ‘</span>’;
}
}
I have tried almost everything that is suggested in the forum. Still the caption looks like it is part of the main text, not the picture. See the blog post in the attached URL.