large shade tree



Recent Posts

Shade Tree Sites |Building Better Websites

Display Post Thumbnails in RSS Feed

Code below will get the post thumbnail and automatically add it to your RSS feeds.
Paste the code into functions.php and save the file.

Your theme must support post thumbnails for this to work.

function cwc_rss_post_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post->ID)) {
        $content = '<p>' . get_the_post_thumbnail($post->ID) .
        '</p>' . get_the_content();

    return $content;
add_filter('the_excerpt_rss', 'cwc_rss_post_thumbnail');
add_filter('the_content_feed', 'cwc_rss_post_thumbnail');