1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 5.00 out of 5)

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


// 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');

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! 🙂

Tip: Click on images to make them larger. If you find anything wrong on this page or need further assistance please comment below or contact me. 🙂

If the above code does not work try using this code instead at the top of the functions 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');

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.

Subscribe To My YouTube Channel:
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

Please like, share and subscribe.

Advanced Programming Made Easy

I hope you enjoyed the article. If I was able to help you please consider a tip for the content.

One Time Tip

more tips

Reoccuring Tips

Tips

Cool People Share:

Leave a Reply

Your email address will not be published. Required fields are marked *

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