Thread Starter
ashdav
(@ashdav)
Ok I’ve found a solution.
In your themes functions.php file, add this code
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:left; margin:10px 15px px 0;' ) ) . '' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');
?>
This will then call up the featured image of your post and embed it in your RSS feed. You can change the margins and styles within that code too.
Crucially, I found it took a few hours to wade through to my feed. I’m using Feedburner on Mailchimp and, because it didn’t work instantly, I figured it didn’t work. Give it time.
This code won’t allow the use of *|RSSITEM:IMAGE|* but if you embed the post in Mailchimp via *|RSSITEM:CONTENT|* then it will add a full-sized featured image followed by your post’s excerpt.
Hopefully this solution works for other people! Remember to give it some time to update 🙂
Ash
Thanks so much for this, Ash.
I’m having some trouble with formatting how the images appear in the feed. Are you wrapping the MailChimp shortcodes in a div or do you have a different way of doing it?
Thanks!
Chris
SORRY – I just discovered the area in the actual functions.php code for styling. Thanks again!
Help with RSS to e-mail set up in MAILCHIMP.
I am setting up an RSS driven campaign now. I chose the RSS Basic template and uploaded my custom banner to the top. I sent out a TEST e-mail and I see it is all text. Is there a way to have the first top photo of my blog post insert into the e-mail automatically? Without a photo it looks like a business letter. I run a fashion business and it needs to look fashionable.
Thanks
Sheryl
Fashion Development Group