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.
Instructions:
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.
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’ );
I’m trying that way now, in a site specific plugin.
Is this just from the feed or also from the HTML code? Is there a reason to not take it out of there too?
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.