Example 1 — Add text to the feed only
Append a short line to every post inside the feed.
function mytheme_feed_footer( $content ) {
if ( is_feed() ) {
$content .= '<p>Thanks for reading from RSS!</p>';
}
return $content;
}
add_filter( 'the_content', 'mytheme_feed_footer' ); How It Works
- The filter runs for every post content.
is_feed()is true only in a feed request.- The extra line is added in the feed, not on the site.

