Return to Snippet

Revision: 28053
at June 30, 2010 05:14 by josephknight


Initial Code
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');

Initial URL

                                

Initial Description

                                

Initial Title
WordPress add post thumbnails to feeds

Initial Tags
textmate, wordpress, function, filter

Initial Language
PHP