Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Featured images in the RSS feed

Adds each post’s featured image to the top of its feed entry, so feed readers and email newsletters built from your feed show it.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Tested with WordPress 7.1
PHP
<?php

$with_image = static function ( $content ) {
	$post = get_post();
	if ( $post && has_post_thumbnail( $post ) ) {
		$content = '<p>' . get_the_post_thumbnail( $post, 'large' ) . '</p>' . $content;
	}
	return $content;
};
add_filter( 'the_excerpt_rss', $with_image );
add_filter( 'the_content_feed', $with_image );

In these packs

  • Content and media: Shortcodes, links, images and small design touches for the public site.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.