Skip to content

Instantly share code, notes, and snippets.

@QROkes
Last active February 26, 2016 03:03
Show Gist options
  • Save QROkes/26e49b3f28da13e3a121 to your computer and use it in GitHub Desktop.
Save QROkes/26e49b3f28da13e3a121 to your computer and use it in GitHub Desktop.
Add featured image in RSS feed (Wordpress)
//* Add featured image in RSS feed
add_filter('the_content_feed', 'qr_rss_featured');
function qr_rss_featured($content) {
global $post;
if( has_post_thumbnail($post->ID) )
$content = ' ' . get_the_post_thumbnail($post->ID, 'thumbnail') . ' ' . $content;
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment