DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Remove meta generator tag from WordPress
Chris Texe
Chris Texe

Posted on

Remove meta generator tag from WordPress

Standard WordPress installation displays version of WordPress in source code:

Image description

There are some security reasons to hide or remove this information. It's better than bad guys will not see your version of WordPress.

So, if you want to remove WordPress version from <head>section put this code into functions.php file:

After saving the file, the whole tag has gone!

And maybe better cheat bad guys?

After saving the second code in the source code you will see:

<meta name="generator" content="FrontPage 4.0">

If you want more tips follow me on Twitter: @TexeChris:

Top comments (2)

Collapse
 
phpdev profile image
Torsten Wenzel

Both codes are the same.

Image description

Collapse
 
texe profile image
Chris Texe Author • Edited on

I think it's Dev.to bug connected with displaying Github gists. Try to refresh the page:

Image description

🌚 Life is too short to browse without dark mode