Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #504362

    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!

    #504407

    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

    #504427

    That worked perfectly. Thank you Basilis!

    #504594

    Hi,

    Glad we could help :-)

    Cheers!
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Featured image in RSS feed’ is closed to new replies.