Standard WordPress installation displays version of WordPress in source code:
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:
// Remove meta generator tag | |
function no_generator() { return ''; } | |
add_filter( 'the_generator', 'no_generator' ); |
After saving the file, the whole tag has gone!
And maybe better cheat bad guys?
// Remove meta generator tag | |
function no_generator() { return '<meta name="generator" content="FrontPage 4.0">'; } | |
add_filter( 'the_generator', 'no_generator' ); |
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)
Both codes are the same.
I think it's Dev.to bug connected with displaying Github gists. Try to refresh the page: