On of the main reason why I use WordPress is its flexibilty, because you can do whatever you want with it. From making it a full-fledged CMS to customizing its feeds you can do almost everything with it. These days when people don’t have time to visit individual websites each day to check new content, feeds have come a long way to being one of the most handy things as people just prefer to subscribe to feeds as they can be read anytime and it just minimizes the possibility of missing something. Yet, many top blogs/websites have feed content which doesn’t appeal visually {I admit!, even my website’s feeds don’t appeal}. As WordPress offers some of the most exciting features in its live interface, it gives you the power to use almost all of those features in your feeds too. Today, we’ll learn to integrate the Post Thumbnail feature {that WordPress offers} to our Feeds so that they look even more nicer.
To include post-thumbnails in your feeds, we need to filter WordPress’ feed functionality and inject the required template tag into both feed-excerpt and full-feed content. To do this open your theme’s functions.php file and add the following code to it:
// show post thumbnails in feeds
function diw_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', 'diw_post_thumbnail_feeds');
add_filter('the_content_feed', 'diw_post_thumbnail_feeds');
Here we are first checking if the post has thumbnails attached to it or not and then we are telling it to include that thumbnail into the post’s feed item. The whole code snippet above inserts the thumbnail before each post, if you want insert the thumbnail after each post then change Line 5 to the following:
$content = $content . '<div>' . get_the_post_thumbnail($post->ID) . '</div>';
We are inserting the thumbnails into each post in Line 5, and therefore you might have noticed that we are using div‘s too. That’s because the <div> will prevent the post text from wrapping around the post thumbnail, but theoretically its removal would enable the post content to wrap around the image:
$content = get_the_post_thumbnail($post->ID) . $content;
That’s it if you have any questions or suggestions then feel free to leave a comment.
Source: Digging Into WordPress

Posted in 

Great Tutorial. Many of the Newbie bloggers are in search of it. Keep it up.
Yep
iPhone 5…
[...]we like to honor other sites on the web, even if they aren’t related to us, by linking to them. Below are some sites worth checking out[...]…
Great BOSS !