Hello,
I have GP premium and element installed with a header.
I would like to have my featured image showing both in archive post and single post. Below title. And with legend.
I tried this code:
add_action( ‘generate_after_entry_header’, ‘tu_add_featured_image’ );
function tu_add_featured_image() {
if ( is_singular( ‘post’ ) && has_post_thumbnail() ) {
the_post_thumbnail();
}
}
add_action( ‘generate_after_entry_header’, ‘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>’;
}
}
Now the caption is here. But I would like it below the image and be able to adjust font and size.
Thank you for your help.