By default WordPress publicly display its version number on your Website. But sometimes this might be a security risk for your blog or Website, especially if you are not using the latest version of WordPress. There are automated programs that look for older versions of WordPress for them to hack, so you want to make discovering the version number of your WordPress as difficult to find as possible.
On your site, right click and choose view source you will find some code.
[css]
<meta name="generator" content="WordPress x.x.x" />
[/css]
Here is a code snippet that allows you to remove your WordPress Version number from both your WordPress pages and RSS feeds. Simply add this code snippet in the functions.php file.
[php]
function all_remove_wp_version() {
return ”; // Returns Nothing, Exactly the Point.
}
add_filter(‘the_generator’, ‘all_remove_wp_version’);
[/php]
Using this method, you will remove the WordPress version number from your WordPress theme files as well as from the WordPress RSS feed.
You may also be interested in our other articles on replace wp login logo with custom logo, align divs horizontally, improve wordpress jpeg image quality and increase the size of excerpt field.
Leave a Reply