Tagged: rss feed
-
AuthorPosts
-
March 28, 2017 at 1:44 am #767824
A while ago, support (sorry, can’t remember who) helped me add the featured photo for my blog posts to the RSS feed using the following addition to functions.php in my child theme:
/**** Add blog photos to RSS Feed ****/
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = ‘<div>’ . get_the_post_thumbnail( $post->ID, ‘medium’, array( ‘style’ => ‘margin-bottom: 15px;’ ) ) . ‘</div>’ . $content;
}
return $content;
}
add_filter(‘the_excerpt_rss’, ‘featuredtoRSS’);
add_filter(‘the_content_feed’, ‘featuredtoRSS’);This worked great for a long time and Mailchimp sent out notifications of new blog articles to my subscribers and included a nice looking photo. However after recent updates, my featured photo now looks blurry like it’s being upsized from a thumbnail to a larger photo causing pixelation.
Here’s the feed for a recent photo if that provides a hint:<description><