Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

RSS Post Thumbnails

Web Hosting at Bluehost Affiliate Disclosure

1
2
3
4
5
6
7
8
9
function add_feed_post_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post->ID)) {
        $content = get_the_post_thumbnail($post->ID, 'thumbnail') . $content;
        }
        return $content;
        }
add_filter('the_excerpt_rss', 'add_feed_post_thumbnail');
add_filter('the_content_feed', 'add_feed_post_thumbnail');

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog