Skip to main content

Display Post Thumbnail in your RSS Feed

WordPress 2.9 introduced get_the_post_thumbnail() allow display a thumbnail in posts. But what about displaying post thumbnails in RSS Feeds? Just reads this post to know how to do.

Simply paste the following code in you functions.php fil. the post thumbnail should be visible once you saved the file.





 
 
 
 
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');
If  you enjoyed this article, please consider sharing it!

Popular posts from this blog

Add Smilies/ Emoticons in Google Talk (Gtalk)

I Really love to use Smilies while chatting. Well, unfortunately GTalk doesn’t have smilies included by default . So Here You will find Out How To do it ... Well, it’s really simple. The main concept of getting smilies is through converting the text smilies of GTalk into smilies. As the new Version of GTalk includes support for themes we can add a theme with custom smilies in order to get rid of those text smilies. In short, it’s nothing but just adding a custom theme. Follow Simple Steps : 1) Download any one of the below smiley theme which you like. Download Classic Emoticons theme Download Bubble Emoticons theme 2) Now extract the zip to a specific folder. 3) Go to the following location: C:/Documents and Settings/(your user name)/Local Settings/Application Data/Google/Google Talk/themes/user/chat 4) Replace (your user name) with your Windows account user name without brackets The folder chat isn’t there by default so you have to create a folder with the name “chat” inside t...

Google Translate, Now With Voice Input

Google Chrome 11 added support for HTML speech input API. " With this API, developers can give web apps the ability to transcribe your voice to text. When a web page uses this feature, you simply click on an icon and then speak into your computer's microphone. The recorded audio is sent to speech servers for transcription, after which the text is typed out for you." Google Translate is the first Google service that uses this feature. If you use Google Chrome 11 Beta , Google Chrome 12 Dev / Canary or a recent Chromium build and visit Google Translate (Click Here) , you can click the voice input icon. Right now, this feature only works for English, so you need to select "English" from the list of input languages.

Create a PDF Viewer ShortCode

Do you need to show PDF files on your WordPress Blog. If yes here is a small code for this. This will gives a feature to open the PDF files using Google Docs . The first step is to paste the following code into your functions.php file: function pdflink($attr, $content) { return '<a class="pdf" href="http://docs.google.com/viewer?url='  . $attr['href'] . '">'.$content.'</a>'; } add_shortcode('pdf', 'pdflink'); Once you saved the file, you'll be able to use the shortcode on your posts and page. Here is the syntax : [pdf href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf]   If you enjoyed this post, Please Consider Sharing it! You may also like to read: How to turn off Find My iPhone How to fix 'iPhone is disabled Connect to iTunes' error messages How to mirror/screencast iPhone to a smart TV how to Delete All Photos from iPhone How to make Chrome default browser How ...