search ]

Show Post Thumbnails in RSS Feed

If you want to display the post featured image in the RSS feed (essential if you use RSS for Mailchimp for example), add the following code to your functions.php file:

// Put post thumbnails into rss feed
function savvy_feed_post_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post->ID)) {
        $content = '' . $content;
    }
    return $content;
}
add_filter('the_excerpt_rss', 'savvy_feed_post_thumbnail');
add_filter('the_content_feed', 'savvy_feed_post_thumbnail');
Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo