Articles
How do I get WP Featured images to show up in my RSS feed?

[dropcap]A.[/dropcap]Its kind of silly that RSS feed readers can’t figure this out for themselves. This is especially true if you run an image heavy blog that uses feature images rather than inserting the image directly into the post.

To fix the problem, in Feedburner at least, simply add the following code to your functions.php file:

function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '' . $content;
}
return $content;
}

add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');

1 Comments
iphone apps development

April 9, 2012 12:35 am Reply

This worked fine and i really pleased to do it. Now i thought that i should Go to do this on all of my wordpress blog Feeds. Thank you!!

Leave a Comment

*