RSS feature image not showing/displaying caption

function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = ‘<div>’ . get_the_post_thumbnail( $post->ID, ‘full’, array( ‘style’ => ‘margin-bottom: 15px;’ ) ) . ‘</div>’ . $content;
}
return $content;
}
add_filter(‘the_excerpt_feed’, ‘featuredtoRSS’);
add_filter(‘the_content_feed’, ‘featuredtoRSS’);

Hi,
I use this code to show the featured image in RSS feed together with full article content with other images on it. But the featured image is not showing the caption.

Read more here:: RSS feature image not showing/displaying caption

Leave a Reply

Your email address will not be published. Required fields are marked *