How to add a thumbnail for your WordPress RSS feed

How to add a thumbnail for your WordPress RSS feed

We here at a1websitepro.com are going to show you how to add a thumbnail for your WordPress RSS feed, a lot of people who have rss feeds going out do not have their featured image showing in the feed, . The thumbnail for your WordPress feed is easy to get in your RSS feed. Open your dashboard in your WordPress and go to Appearance > Editor. Look for your functions.php file and add this bit of code to the bottom of it. Make sure that you keep it in the php tags. If you need to know what a php tag is please go to the lessons on this site here


[php]
// THIS INCLUDES THE THUMBNAIL IN OUR RSS FEED
function insertThumbnailRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = ” . get_the_post_thumbnail( $post->ID, ‘thumbnail’ ) . ” . $content;
}
return $content;
}

add_filter(‘the_excerpt_rss’, ‘insertThumbnailRSS’);
add_filter(‘the_content_feed’, ‘insertThumbnailRSS’);
[/php]

This code will put the featured image for your WordPress rss feed the next time you make a post on your blog. If you are unsure how to do this we can provide this service to you for about $10. If you are interested you can fill out our contact form at our free estimates on web development page. We look forward to hearing from you and viewing all you cool projects on the web. Web development and design is what we do and we love it! 🙂

Only cool people share!

If the above code does not work try using this code instead at the top of the functions file.
[php]
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’);
[/php]

If you want to say updated on more WordPress tutorials and more subscribe to my feed and we will email them to you as we post them.

Enter your email address:

Delivered by FeedBurner

thumbnail for your WordPress RSS feed

How to add a thumbnail for your WordPress RSS feed was last modified: October 14th, 2013 by Maximus Mccullough

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.