• I would like to add a thumbnail to my RSS feed. Each post has a thumbnail in a custom field and a featured image. I’ve installed some plugins but they are not really working. Probably I’m doing something wrong, I just don’t know what that is.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In most cases, they set your featured image to be the thumbnail in the RSS feed. Do you have your featured images set?

    Hey.

    I have the same need to add a thumbnail to my rss feed. If I check my own feed I just see a post image and not the thumbnail. Unfortunately if I just include a youtube video and no image in the post but set a thumbnail there is no image at all.

    My WP Version is 3.5.1

    I already added this piece of code to my functions.php:

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

    But that didn’t change anything.

    I have been trying to get this to work for several days. I have got feature images ie thumbnails working on my posts, but they do not appear in my RSS feed. I’ve tried various plugins, I’ve upgraded to the latest version of WordPress.

    I followed these instructions, no love.

    I have also discovered my RSS 2.0 feed doesn’t validate, I’ve also used SimplePie to determine that it can find an enclosure, but that enclosure doesn’t have a thumbnail. I’m going to try upgrading SimplePie as I’m not sure why this is happening, but for me the code above doesn’t seem to be sufficient to get thumbnails in my RSS feeds. I made sure the last 20 posts have thumbnails, uploaded into WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add thumbnail to RSS feed’ is closed to new replies.