Filter for adding image to RSS feed not working

the code at the end of my functions.phpfile in my theme seems to have stopped adding images to my RSS feed. Does anyone know what could have changed / where I should start looking to debug?

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

Read more here: Filter for adding image to RSS feed not working

Leave a Reply

Your email address will not be published. Required fields are marked *