Add featured thumbnails to RSS posts?
-
WordPress version: 3.5.1
WordPress SEO version: 1.4.7Previously working code in my functions.php that added featured post thumbnails to my RSS feeds no longer does anything since moving over to WordPress SEO (from AIOSEO).
// Add thumbnails to RSS feed
add_filter(‘the_excerpt_rss’, ‘eg_insertthumbnailrss’);
add_filter(‘the_content_feed’, ‘eg_insertthumbnailrss’);
function eg_insertthumbnailrss($content) {
global $post;
if ( has_post_thumbnail( $post->ID )) {
$content = “<p>” . get_the_post_thumbnail ( $post->ID, ‘thumbnail’ ) . “</p>” . $content;
}
return $content;
}This used to work fine, so why isn’t it working now?
Thanks,
Chris.
The topic ‘Add featured thumbnails to RSS posts?’ is closed to new replies.