Removing WordPress generator meta tag

Sometimes it comes into mind that nobody should know what’s the CMS that is used for my site. But CMSs do not take care of our feeling. What they actually do is they leave a generator meta tag which says about the CMS that’s being used. I have used Joomla and WordPress and both of them do have this tag. When you look at the source code of your site (WordPress), you will find something like this

<meta name="generator" content="WordPress 5.0.3" />

This is for WordPress. But there is a way we can remove this from our site. To do this, add the following php code to your theme’s functions.php file.

remove_action('wp_head', 'wp_generator');

If everything goes on well, then the meta generator tag must have been  removed from your WordPress site.

Leave a Comment

Your email address will not be published.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Send a Message