Add Featured Image to WordPress RSS with functions.php
I was configuring an Aweber email list to create and send a newsletter automatically from a WordPress RSS feed each time a new post was published. The problem is that while the images within a post are included in a full RSS feed, the featured image is not. There are plugins that can add this functionality, but I avoid using plugins whenever possible to keep my clients’ websites lean and running fast, so I whipped up this PHP code that you can simply paste into your functions.php file to accomplish the task.
This script determines the featured image for each post, wraps a link to the post around it, applies some CSS styling, and then drops it into your RSS feed. The result is a clean and simple way to put your featured image into your RSS feed and increase click-through rates to your website.