• Resolved erikhgm

    (@erikhgm)


    I have tried the different codes there are out there to include a thumbnail in the RSS feed and they do insert the thumbnail in the feed but when I view a post with a thumbnail attached to it on my website, the post excerpt is showing up on the top of the page before the wrapper.
    Does anyone know why this is?
    Thanks
    Erik

    // THIS INCLUDES THE THUMBNAIL IN OUR RSS FEED
    add_filter( ‘the_excerpt_rss’, ‘voodoo_insertThumbnailRSS’ );
    add_filter( ‘the_content_feed’, ‘voodoo_insertThumbnailRSS’ );
    function voodoo_insertThumbnailRSS( $content ) {

    global $post;

    if ( has_post_thumbnail( $post->ID ) )
    $content = ” . get_the_post_thumbnail( $post->ID ) . ” . $content;

    return $content;
    }

Viewing 4 replies - 16 through 19 (of 19 total)
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Problem with RSS thumbnail code’ is closed to new replies.