Hello
Has something changed that would cause the featured image to not show in the RSS feed? I believe that this used to work but it is not working on any of my Enfold sites.
Thanks!
Hey Keith!
Please add the following code, to your WordPress functions.php file
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');
Let us know if that worked out.
Best regards,
Basilis
That worked perfectly. Thank you Basilis!