Scroll Down
/**
* code #7 - add post thumbnails into RSS feed
* source - http://www.wpfunction.me/
* @param string
* @return string
*/
function add_feed_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = get_the_post_thumbnail($post->ID, 'thumbnail') . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'add_feed_post_thumbnail');
add_filter('the_content_feed', 'add_feed_post_thumbnail');
By default your featured image and post thumbnails will not show up inside your WP RSS feed. I would love to see the WordPress developers include this as a core feature during an upcoming release. But for now it’s easy enough to copy this chunk of code and append the thumbnail image URL.