Last active
December 18, 2018 21:31
-
-
Save dmhendricks/cfe8233a6b4467f8ee1159bc4c39eca5 to your computer and use it in GitHub Desktop.
Remove the meta generator tag from WordPress page head and RSS feeds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Add this to your child theme's functions.php to remove the generator meta tag from both | |
* your web sites page head and from your RSS feeds (ex: /feed/) | |
*/ | |
// Remove generator meta tag from page head | |
remove_action( 'wp_head', 'wp_generator' ); | |
// Remove generator tag from RSS feeds | |
add_filter( 'the_generator', '__return_null' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment