After having spent hours and tried all different functions and plugins, I would like to ask if one of you already succeeded in adding a new tag in his RSS feed for the featured image.
Both with the plugins and the functions I tried, the image went directly in the description tag, right before the description text that I also need to fetch.
Here is one of the function I tried :
function insertThumbnailRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail' ) . '' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'insertThumbnailRSS');
add_filter('the_content_feed', 'insertThumbnailRSS');
Any ideas or suggestions?
I am fetching the RSS feed of my blog using Yahoo API.
Thanks for help.