How to Remove WordPress Version from RSS Feed

Snippets by IsItWP

Do you want to remove WordPress version from RSS feed? It’s easy with a simple code snippet. Let’s take a look at how to remove WordPress version from RSS feed.


All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:

	function remove_feed_generator() {
	return '';
	add_filter('the_generator', 'remove_feed_generator');

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: 62 best free WordPress blog themes or 7 best WordPress contact form plugins.

Comments   Leave a Reply

  1. You can simplify that function a little further so it is a one liner and uses the __return_empty_string function, eg,

    add_filter ( ‘the_generator’, ‘__return_empty_string’ );

    1. I’m trying that way now, in a site specific plugin.

  2. Is this just from the feed or also from the HTML code? Is there a reason to not take it out of there too?

    1. This is just for the feed and in regards to the I’m not sure of any reasons not to take out the version number.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!