Show Featured images in Feed

Well we always love subscribers those subscribe to our posts, but sometime we see that featured images cannot be viewed in the RSS Feed, well today we are going to show featured images in Feed, with a simple lines of code.

By default WordPres do not add the featured images in Feed but we can manually add it by adding the below code in functions.php :

add_filter('the_content_feed', 'rss_post_thumbnail_wpden');
function rss_post_thumbnail_wpden($content) {
	global $post;
	if( has_post_thumbnail($post->ID) )
		$content = '<p>' . get_the_post_thumbnail($post->ID, 'thumbnail') . '</p>' . $content;
	return $content;
}

Well you can add more detailed code or customize to your willing please not that it can be even used to add custom meta images instead of featured images also.

Subscribe to WPDEN

@