How To Remove WordPress Meta Tags Beginner's Guide

Thursday, June 28, 20120 comments


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
  1. Login to your WordPress admin panel
  2. Navigate to Design -> Theme Editor and click Theme Functions (functions.php) from the list of theme files
  3. Just before the closing ?> tag, add the following:
  4.      remove_action('wp_head', 'wp_generator')
  5. Click the Update file button and go view the source of your site
  6. if you do not have functions.php file, you may create one with the content below and upload to your theme folder
  7. Done, you have just removed meta generator tag in wordpress.
  8.  Now clear your wordpress cache (if you have any) else you can visit your front page to verify the existence of meta generator tag.
If all goes well, the should be removed.

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!
Share this article :
Mukesh Mali
Posted By: Mukesh Mali

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.

 
Copyright © 2011 - 2012. Bloggings in Hindi - All Rights Reserved
Home | BlogginGS | MKT Media Template
Supported by: MKT Media Published by Mukesh Kumar
Designed by: Mukesh Kumar | Powered by: MKT