i have a wordpress blog http://cgvector.com and I want to show Featured Images in RSS Feed. How can i do this? My feed address is: http://feeds.feedburner.com/cgvector
i have add this code but it’s not working.
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');
This one should do the trick for you…
Your code looks fine, but you can paste this code (all most same, anyways) in your
functions.php
that is located inside yourwp-content/themes/yourtheamefolder
Keep on mind that
Feedburner
caches your feed, so wait 12-24 hours for it to update before you see these changes.