Did you know that? By default, WordPress provides your WordPress version in your feeds. If you peak under the hood and look at the source code for any of your WordPress feeds. Near the top of the file, you will see that WordPress includes its version number declared via
It serves as a slight security risk by enabling attackers to target any specific security holes that may be present in your particular version of WordPress. I will show you how to remove WordPress Version Number on feeds and your theme’s as well. What should we do to remove this information from your site’s feeds, add this tiny function on your functions.php
<?php
function killVersion() { return ''; }
// For Feeds
add_filter('the_generator','killVersion');
// For Theme Header
remove_action('wp_head', 'wp_generator');
?>
Or you can use another method below
// remove version info from head and feeds
function complete_version_removal() {
return '';
}
add_filter('the_generator', 'complete_version_removal');
Second code almost the same with the first code, but using add_filter and not remove_action. I think on new version WordPress, second code is better
And done, now, you WordPress Version Number has been hidden…



It doesn’t work anymore..
What’s you mean doesn’t work? it’s worked
It also doesn’t work on your website
And why would you only hide the WordPress version in the header anyway. You can still find it here http://wptricks.net/_w/readme.html
we will remove it too… thanks for the info
Seems to work for me. Maybe you did something wrong salsabel?
It doesn’t work anymore..
Does anyone have a link that works?
Just put this line in the functions.php inside your theme folder.
remove_action(‘wp_head’, ‘wp_generator’);just before the ? > at the end
Some plugins like login-with-ajax and wiki are showing the version number in source code. How do I remove them?
i’ve tried this function but it’s doesn’t work for enqueue script. any suggest?
Not working anymore for WP 3.1