How to remove the meta name generator tag

Yesterday I showed you how to remove two useless tags from your WordPress head section. Today we’ll remove a tag that could expose your site by revealing which WordPress version you are running. This tag used to be simple to remove but WordPress has moved it from the template to the core.

Here’s how to remove it:

  • Login to your WordPress admin panel
  • Navigate to Design > Theme Editor and click Theme Functions (functions.php)
  • Just before the closing ?> tag add this

remove_action(‘wp_head’, ‘wp_generator’);

  • Click Update File

Done!

 

Popularity: 2% [?]

Post to Twitter Post to Digg Post to Facebook Post to StumbleUpon

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>