How to Customize WordPress RSS Feed Without Editing Core (2026)
Want to add a copyright line, related posts or a featured image to your feed? In 2007 we customised our WordPress feed by editing core files, first wp-rss2.php and then feed-rss2.php, and lost every change when we upgraded to WordPress 2.2. Today there’s a much better way to customize WordPress RSS feed output: hooks and filters that survive every update.

Quick answer: Don’t edit wp-includes/feed-rss2.php; it’s overwritten on every update. Instead, add code to the Code Snippets plugin or your child theme’s functions.php using filters such as the_content_feed (add text or images to each item) and actions such as rss2_item (add custom tags). SEO plugins like Rank Math and Yoast also let you add text before or after feed content without code.
Table of Contents
Why we lost our feed changes in 2007
Older WordPress versions built the feed from wp-rss2.php in the root folder. WordPress 2.2 moved the template to wp-includes/feed-rss2.php, so our edits disappeared. Core files are replaced on every update, so any change there is temporary.
Add content to every feed item
This snippet adds a copyright line and a link back to the post:
add_filter( 'the_content_feed', function ( $content ) {
$link = get_permalink();
$content .= '<p><a href="' . esc_url( $link ) . '">Read the full post on our site</a>. © ' . date( 'Y' ) . ' ' . get_bloginfo( 'name' ) . '</p>';
return $content;
} );Add the featured image to your feed
add_filter( 'the_content_feed', function ( $content ) {
if ( has_post_thumbnail() ) {
$content = get_the_post_thumbnail( null, 'large' ) . $content;
}
return $content;
} );Other ways to customize WordPress RSS feed settings
- Full text or summary: Settings > Reading > “For each post in a feed, include”.
- Number of items: Settings > Reading > “Syndication feeds show the most recent”.
- Exclude a category: use the
pre_get_postsaction withis_feed(). - Delay publishing to feeds by a few minutes to fix typos first.
- Custom feed template: copy feed-rss2.php into your child theme and load it with
add_feed()if you need full control.
Without code
Rank Math (General Settings > Others) and Yoast (Settings > Advanced > RSS) let you add text with your post link before or after each feed item, which also helps you get credit when scrapers copy your feed. See our tips to stop RSS feed scraping.
FAQ
Where is the WordPress RSS feed?
At yoursite.com/feed/, with category feeds at /category/name/feed/.
Why don’t my feed changes show up?
Feed readers and caching plugins cache feeds. Clear your cache and wait for readers to refresh.
Can I edit feed-rss2.php?
You can, but updates will overwrite it. Use filters or a child-theme template instead.
Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.







I tried editing wp_includes>feed-rss2.php and cannot see any changes in the output of the system when I look at the rss feed
What am I missing
thanks for this info, if you can explain more about customising the file php. Thanks again =)
wow, you and i have the same intention to hack wp-rss2. Right now, i’m try to accomplish such thing. and until now, wp-rss2 is still a mystery for me :(
Can you tell us how to modify the feed-rss2.php to customize the feeds?
I like the related posts idea. I didn’t know you could actually do this. Thanks PC…
The problem is that Instant Upgrade (which I insist, is FANTASTIC), changes the ownership of the files to the apache webserver, so in order to modify the files I have to manually change the owner via a terminal with chown and the change the file. And back next time I use Instant Upgrade …..
But I guess I will have to do it that way for a while … :D
Thanks !
@hombrelobo – I keep a back up of my edited feed php file. I upgrade wordpress in the usual way (or as you do), then I download the concerned php file via FTP, edit it in notepad and upload it back. Works!
@Arpit – Its actually very simple to edit the php file in any text editor. You just need to add a few lines of html. Keep a back up copy and revert back if something goes wrong.
I prefer it if there was some plugin to do this rather than editing core files.
I have a problem with that …. I use Instant Upgrade (great plugin that automatically upgrades to the lates stable version), but since it takes control of the core files, it doesn’t let me modify the rss file afterwards ……
mmmmmm