Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by RandomPixels for Add a Post Thumbnail to an RSS Feed with custom size

While your code is technically correct, there's one small change i'd do, just to prepend the thumbnail to the code. Using your code will break the Full Text / Summary admin setting.

function cwc_rss_post_thumbnail($content) {    global $post;    if(has_post_thumbnail($post->ID)) {        $precontent = '<p>' . get_the_post_thumbnail(get_the_id()) .'</p>';        $content = $precontent.$content;    }    return $content;}

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>