Display Featured Images In RSS Feed

 In RSS Feeds

A picture tells a thousand words, as they say. Encourage subscribers to visit your site rather than just read your content in their RSS feed by displaying featured images by default:


add_filter('the_content_feed', 'rss_post_thumbnail');
function rss_post_thumbnail($content) {
global $post;
if( has_post_thumbnail($post>ID) )
$content = '

' . get_the_post_thumbnail($post>ID, 'thumbnail') . '

' . $content;
return $content;
Recommended Posts

Leave a Comment

Start typing and press Enter to search