Replace the generator meta

This is  one-liner actually, that gently removes the action that writes the Generator meta tag to your HTML pages. Adding this PHP code to the functions.php of your wordpress theme will replace the meta tag with your own custom meta details.



// Replace the WordPress Generator
function change_generators() { return '<meta name="generator" content="WordPress 9.0" />'; }
add_filter( 'the_generator', 'change_generators' );

Leave a comment