Ashley Cameron Design

Ashley Cameron Design

RSS Post Thumbnails

SnippetsWordPress

About a 1 minute read

"Design is a formal response to a strategic question."

Mariona Lopez, business owner


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');