/ Published in: PHP
Placed in the functions.php file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function insertThumbnailRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '<p>' . get_the_post_thumbnail( $post->ID, 'medium' ) . '</p>' . $content; } return $content; } add_filter('the_excerpt_rss', 'insertThumbnailRSS'); add_filter('the_content_feed', 'insertThumbnailRSS');
URL: http://cdharrison.com/2009/12/16/the_post_thumbnail-for-rss-feeds/