Hello
I wonder if somebody can help.
I use the RSS feed with the newsletter (I use MailerLite). Before switching to GeneratePress, the /feed/rss2/ url worked fine. After switching to GeneratePress, that URL type stopped working with MailerLite for some reason.
The /feed/rdf/ or /feed/atom/ work, but I’m strugling to get the featured image right. It looks like it is ignoring my size setting (full) and get a low res version that looks all pixelated.
Here is the code I’ve added to the functions.php style using the Snippets plugin.
// you can adjust what size image is pulled, and it's positioning in the $output below
function featured_image_in_feed( $content ) {
global $post;
if( is_feed() ) {
if ( has_post_thumbnail( $post->ID ) ){
$output = get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
$content = $output . $content;
}
}
return $content;
}
add_filter( 'the_content_feed', 'featured_image_in_feed' );
add_filter( 'the_excerpt_feed', 'featured_image_in_feed' );
Any clue on how to fix it?
Many thanks!
Mat