Removing The Meta Generator

One of the things wp_head() adds to a WordPress theme's header template is a meta generator tag showing which version of WordPress you're using. It helps the WordPress developers know how many WordPress sites there are in the world. However, it's also an advertisement to would-be hackers that your site runs on WordPress—especially if you haven't updated to the latest release. Now, you should always upgrade to the newest release as soon as possible, but of course there will be times when you just can't upgrade immediately. If that's the case, you wouldn't want to advertise to the world that you're running an older, potentially insecure version of WordPress.

You can remove the meta tag altogether using the function shown in Listing 11-2, placed in your theme's functions.php file.

Listing 11-2. Removing the meta generator remove_action('wp_head', 'wp_generator');

Top 100 Wordpress Plugins

Top 100 Wordpress Plugins

The bulk of the plugins featured are free and available from the WordPress.org website. However, a few commercial plugins are featured in the Plugin Showcase within this guide. The five plugins in the Plugin Showcase aren’t rated. Less information about them is offered because, in many cases, information such as the last time the plugin was updated isn’t available.

Get My Free Ebook


Post a comment