was successfully added to your cart.

PHP Code

So WPbeginner.com released a good article that, in my opinion, needs to be shared… or at least the subject. By default, WordPress keeps their version number burrowed in their code… so when you view the source, you’ll be able to locate the WP version that you are running.

Yes, it can be helpful. But it can so easily cause more trouble than what it’s worth… I mean, when was the last time you looked at the version via the source?

So, there are a few ways to do this. But the best, or correct way to do this is using the “function method.” Basically, we’re adding a function that will remove the WP version from the header and RSS feeds.

Here is WPbeginner’s code.  Be sure to add the following to the functions.php file.

 

function wpbeginner_remove_version() {
return '';
}
add_filter('the_generator', 'wpbeginner_remove_version');

 

As always, please remember, the best way to keep your site secure is to update your blog to the latest version.

Brandon

Author Brandon

A Systems Analyst by trade and geek by default. He rambles a bit. Mostly in the form of tips and announcements. But it's quick and painless... and usually helpful.

More posts by Brandon