WordPress by default displays the version number as meta tag in header of websites powered by it. Here is a simple trick to disable WordPress displaying this meta tag.
How to Remove WordPress Meta tags :
The following simple solution will allow you to quickly remove the tag from WordPress
- Login to your WordPress admin panel
- Navigate to Design -> Theme Editor and click Theme Functions (functions.php) from the list of theme files
- Just before the closing ?> tag, add the following:
- Click the Update file button and go view the source of your site
- if you do not have functions.php file, you may create one with the content below and upload to your theme folder
- Done, you have just removed meta generator tag in wordpress.
- Now clear your wordpress cache (if you have any) else you can visit your front page to verify the existence of meta generator tag.
remove_action('wp_head', 'wp_generator')
Update for Beginner's Guide :
function rm_generator_filter() { return ''; }
if (function_exists('add_filter')) {
$types = array('html', 'xhtml', 'atom', 'rss2', /*'rdf',*/ 'comment', 'export');
foreach ($types as $type)
add_filter('get_the_generator_'.$type, 'rm_generator_filter');
}
Enjoy!
Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.
Note:
1. Make sure to click the "Subscribe By Email" link below the comment to be notified of follow up comments and replies.
2. Please "Do Not Spam" - Spam comments will be deleted immediately upon our review.
3. Please "Do Not Add Links" to the body of your comment as they will not be published.
4. Only "English" comments shall be approved.
5. If you have a problem check first the comments, maybe you will find the solution there.