Skip to content

Mstoic

  • Home
  • Start Here!
  • Best Deals
  • Facebook Tricks
  • Privacy
  • Resources
  • 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
  • About Us

How To Display Featured Image In RSS Feeds In WordPress

Editorial Team | 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]
  • Google Authenticator for WordPress
  • How to Edit .htaccess File from WordPress Dashboard Itself
  • 22 Things To Do For A Faster WordPress Website
  • 4 Ways To Enable Gzip Compression In WordPress

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 Editorial Team

Next Post

2 Ways To Add Read More Link On WordPress

by Editorial Team

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
Recommended Next
No-follow All External Links In WordPress Without Plugin

Your Comment Cancel reply

Follow Us

Like us Follow us Follow us

Categories

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

Related Articles

  • Reverse a String using StringBuilder