Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iLenTheme/220e1b42a4b1d450caeb123320e37365 to your computer and use it in GitHub Desktop.
Save iLenTheme/220e1b42a4b1d450caeb123320e37365 to your computer and use it in GitHub Desktop.
WordPress: Remove generator and feed links meta tags
/*
Remove meta tags for generator, feed links, and pagination
Useful for landing pages or static, stand-alone sites/pages.
*/
remove_action( 'wp_head', 'wp_generator');
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'rsd_link'); // EditURI
remove_action( 'wp_head', 'wlwmanifest_link'); // Windows Live Writer
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); // pagination, rel='next' or rel='prev'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment