Latest Tech and Tips

How to Add Post Thumbnail to your WordPress RSS Feeds


In our earlier tutorial, we revealed you how you can add post thumbnails inWordPress The depressing reality is that also if you allow the post thumbnails, it will certainly disappoint up in your RSS feeds. But we have a service for that. In this short article, we will certainly reveal you how you can add post thumbnails to your WordPress RSS feeds with an easy feature.

All you have to do is open your motif’s functions.php documents and also add the adhering to code:

feature rss_post_thumbnail($ material) {
international $post;.
if( has_post_thumbnail($ post->> ID)) {
$ material='<< p>>'. get_the_post_thumbnail($ post->> ID).
'<'. get_the_content();.
return $material;.
add_filter(' the_excerpt_rss', 'rss_post_thumbnail');.
add_filter(' the_content_feed', 'rss_post_thumbnail');.

Feel cost-free to design this nevertheless you such as. Remember to trigger WordPress post thumbnails utilizing our major WordPress post thumbnail tutorial prior to including it to your RSS.

Source: Dave Redfern