How to: Add Post Thumbnails to WordPress RSS Feed

How to: Add Post Thumbnails to WordPress RSS Feed



We used to see the thumbnail images in blog posts. But, I think you didn’t know how to add thumb images in RSS feed posts. In WordPress, you can show your thumb images in RSS feed posts. It is very easy. Simply copy and paste this code block to your WordPress theme’s function.php file.

function rss_thumb($content)
 {
 global $post;
 if(has_post_thumbnail($post->ID)) {
 $content = get_the_post_thumbnail($post->ID).$content;
 }
 return $content;
 }
 add_filter('the_excerpt_rss', 'rss_thumb');
 add_filter('the_content_feed', 'rss_thumb');