Skip to content

Mstoic

  • Home
  • Start Here!
  • Best Deals
  • Facebook Tricks
  • Privacy
  • Resources
  • About Me
  • TOC
  • Tools
    • Web Tools
      • Stop Watch
      • QR Code Generator
      • Adsense Code Converter
      • Blogger Sitemap Generator
      • Difference Between Two Texts
      • Vacation Checklist
      • Twitter Symbols
      • Count Down
    • Investment
      • SIP Calculator
      • Power of Compounding
      • PPF Calculator
      • FD Calculator

How To Display Featured Image In RSS Feeds In WordPress

Hemant Aggarwal | December 27, 2013December 27, 2013 | Wordpress |

We earlier talked about setting a featured in WordPress and changing its dimensions. But WordPress, does not add this featured image into the RSS feeds. If you show featured image on your index pages, then you would surely like to add featured image to your RSS feeds.

Related Articles

  • Optimizing Database For WordPress Websites Automatically [Free Plugin]
  • 22 Things To Do For A Faster WordPress Website
  • Google Authenticator for WordPress
  • Doing Complete SEO Of Your WordPress Website With WordPress SEO By Yoast
  • Turn OFF Autosave In WordPress And Reduce Database Size

The problem seems to be very big, but the solution is quite easy though. You need to add a little PHP code snippet to your theme’s functions.php file and that will do the trick. You can read our tutorial on editing functions.php file, if you don’t know it already.

Display Featured Image Before Post Content

// Adding Post Thumbnail To RSS Feeds function add_post_thumbnail_feeds($content) {     global $post;     if(has_post_thumbnail($post->ID)) {         $content = '<div>' . get_the_post_thumbnail($post->ID) . '</div>' . $content;     }     return $content; } add_filter('the_excerpt_rss', 'add_post_thumbnail_feeds'); add_filter('the_content_feed', 'add_post_thumbnail_feeds');

Display Featured Image After Post Content

// Adding Post Thumbnail To RSS Feeds function add_post_thumbnail_feeds($content) {     global $post;     if(has_post_thumbnail($post->ID)) {         $content = '<div>' . $content . get_the_post_thumbnail($post->ID) . '</div>';     }     return $content; } add_filter('the_excerpt_rss', 'add_post_thumbnail_feeds'); add_filter('the_content_feed', 'add_post_thumbnail_feeds');

Float The Image To The Left

// Adding Post Thumbnail To RSS Feeds function add_post_thumbnail_feeds($content) {     global $post;     if(has_post_thumbnail($post->ID)) {         $content = '<div style="float:left; margin-right:5px;">' . get_the_post_thumbnail($post->ID) . '</div>' . $content;     }     return $content; } add_filter('the_excerpt_rss', 'add_post_thumbnail_feeds'); add_filter('the_content_feed', 'add_post_thumbnail_feeds');

You can style the image and the content according to you. But make sure that your code is free of errors. An erroneous code in functions.php file can destroy your website completely.

Previous Post

2 Ways to Edit Functions.php File in WordPress

by Hemant Aggarwal

Next Post

2 Ways To Add Read More Link On WordPress

by Hemant Aggarwal

Tags
  • Add Post Thumbnails To RSS
  • Featured Image Feeds
  • Featured Image Rss
  • How To Add Post Thumbnails To RSS Feed
  • How To Post Thumbnails In WordPress RSS Feeds
  • Image Feeds
  • images in rss
  • Learn How To Add Post Thumbnails To WordPress RSS Feeds
  • Post Thumbnail
  • Post Thumbnail Feeds
  • Post Thumbnail Rss
  • Post Thumbnails In WordPress RSS
  • Rss Image
  • The Post Thumbnail Wordpress
  • Wordpress Post Thumbnail

Author: Hemant Aggarwal

Hemant Aggarwal

WordPress Developer - Tech Blogger

View all posts by Hemant Aggarwal

Recommended Next
Setting the WordPress Featured Image Size

Your Comment Cancel reply

Follow Us

Like us Follow us Follow us

Categories

  • Tricks (93)
  • Facebook (83)
  • Tips (76)
  • Windows (67)
  • Wordpress (40)
  • Android (38)
  • Antivirus (35)
  • Internet (33)
  • How To (29)
  • Downloads (25)
  • Webmasters (25)
  • Customization (25)
  • Utilities (21)
  • Gmail (20)
  • Windows 7 (19)

Ask Questions

If you have any questions about anything, do write your queries at our Forum. We will be happy to help.

Forum

Related Articles

  • 8 Fascinating Cell Phone Pranks
  • Revealing Windows Hidden “Send To” Menu and Adding Items to it
  • Create A Movie Using Your Facebook Timeline Images
  • Disable Autorun/Autoplay in Windows 7, Vista and Windows XP
  • Automatically Upload Photos to Dropbox, Facebook, Flickr and Others

About The Author

Hemant Aggarwal writes this blog to help computer users with problems related to web services and getting the most out of their own websites.

Author