yanknudtskov
2/19/2014 - 10:53 PM

Display Featured Images In RSS Feed A picture tells a thousand words, as they say. Encourage subscribers to visit your site rather than jus

Display Featured Images In RSS Feed

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 = '<p>' . get_the_post_thumbnail($post->ID, 'thumbnail') . '</p>' . $content;
  return $content;
}