Hi there,
try this PHP snippet:
add_filter( 'post_thumbnail_html', 'db_featured_image_before_after_content',10,5 );
function db_featured_image_before_after_content($html, $post_id, $post_thumbnail_id, $size, $attr) {
// If not single or no featured image return
if( ! is_singular() || $html == '' ) {
return $html;
} else {
// define before and after image elements
$before_img_html = '<span class="before-featured"><!-- i come before image --></span>';
$after_img_html = '<span class="after-featured"><!-- i come after image --></span>';
return $before_img_html . $html . $after_img_html;
}
}