Featured image rss doesn't work

Posted in: Newsmag
Post count: 3

I add the code below to Newsmag/functions.php file but the RSS doesn’t show thumbnail.
// THIS INCLUDES THE THUMBNAIL IN OUR RSS FEED
function insertThumbnailRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array('style' => 'margin-bottom:10px;float:right;') ) . '' . $content;
}
return $content;
}

add_filter('the_excerpt_rss', 'insertThumbnailRSS');
add_filter('the_content_feed', 'insertThumbnailRSS');

Thank for helping. Hope to hear respond soon. Thank again

Post count: 3

Here is the link http://nhipsongtre360.com/bai-thuoc-ki-dieu-diet-tan-goc-benh-thoai-hoa-cot-song-va-dia-dem/
Sorry forgot the link (The RSS is in the widget sidebar). It only showing the title.

Post count: 6600

Hi,

I have also tested this and it works just that it doesn’t add the featured image to your rss feed widget but to your feeds: http://screencast.com/t/qlaq7n72i
Try to find a pluygin or another implementation to add the featured image to the WordPress rss feed widget.

Thanks

Post count: 3

Thank Lucian

Post count: 30

Hey Lucian,

Could give me some advice on this topic. I’ve implemented the code into functions.php, a thumbnail of the featured image is visible. Is it possible to add a full image to the RSS-feed instead of the thumbnail?

Thanks in advance!
Tim

Post count: 1291

Hi,

Try to replace thumbnail with full in the get_the_post_thumbnail function, you can chech the reference here – http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newsmag’ is closed to new topics and replies.