My rss feed doesn't currently show any images.
http://getthebasicsright.com/blog/feed/
The theme that I am using is papercuts, with some tweaks.
I've tried the following 3 methods to add the featured image to the rss feed, but none of them have work.
Please can you let me know how to fix this issue?
I have tried this code in functions.php (this code is there now so that you can see it not working)
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');
I have tried this code in functions.php
add_filter( 'the_content', 'featured_image_in_feed' );
function featured_image_in_feed( $content ) {
global $post;
if( is_feed() ) {
if ( has_post_thumbnail( $post->ID ) ){
$output = get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
$content = $output . $content;
}
}
return $content;
}
And I have tried this plugin