Post Thumbnail on RSS Feed


Sponsored Links




Jeff Starr give nice tricks how To Added Post Tumbnail in our RSS Feed, and I will show you on today wordpress tips. This code only need tiny hack, we put some code in our functions.php and the code will be execute automatically using add_filter method.

Added Post Thumbnail on Feed - Megan Fox Jonah Hex

Added Post Thumbnail on Feed - Megan Fox Jonah Hex


So, write down Added Post Tumbnail in our RSS Feed code

function do_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', 'do_post_thumbnail_feeds');
add_filter('the_content_feed', 'do_post_thumbnail_feeds');

That’s it, we didn’t need to modify another file and the code will be injection into our RSS content or excerpt feed.

*please note Post Tumbnail featured avaliable on WordPress 2.9.x, image courtesy of Egotastic

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

How to Add Post Thumbnail to your WordPress RSS Feeds

Easy to follow tutorial that will allow you to add post thumbnails to your WordPress RSS feeds with a simple function. Read More

Display post thumbnail in your RSS feed - TechFeb.COM - Technology

Post Thumbnails is important feature in Wordpress and it makes our post and blog more attractive. But you can extend it more and show your Post thumbnails also in Read More

Post Thumbnails in RSS feeds — Super Ginormous

What the heck is going on, you ask? Say hello to Tersus. Bare bones? You got it. Tersus is an achingly simple WordPress theme without all the usual cruft. Read More

How To Add Post Thumbnail Or A Thumbnail Image To Wordpress RSS

code in your active theme’s function.php (this small code is written and fully tested by me, you can check our RSS feed) There is no need that you set a post thumbnail Read More

How To: Add a Post Thumbnail to an RSS Feed in WordPress — Brad

Have you ever needed to add the WordPress post thumbnail to an existing RSS feed? The below code will add a new element named to your RSS feed. Read More


7 Responses to Post Thumbnail on RSS Feed

  1. Space Game says:

    Great trick! It’s much more appealing to have an image in the RSS.
    Btw, good idea with the celebrity images – makes me wanna come back to check out your site again. :)

  2. Neil Diamond says:

    lol, it took me awhile but i get it now. nice!

  3. Pingback: wp-popular.com » Blog Archive » How To Show Post Thumbnails in RSS Feeds # WordPress Tricks & Tips

  4. Roshith says:

    i need to show thumbnails..thanks for the info

  5. Uli says:

    Hey,

    did you notice that when you apply this hack, it forces the RSS feed to go from summary to full? In essence, it shows the thumbnail, then the full post with the larger-scale image.

    if you haven’t tried that, check it out. Now the question: how to display thumbs on excerpt-only RSS feeds?

  6. Pingback: Como agregar los Thumbnails a los RSS feeds. Wordpress En Acción

  7. Pingback: How to Exlclude some Categories on your WordPress RSS Feed | WordPress News Wire

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>