Skip to content

Instantly share code, notes, and snippets.

@leekelleher
Created January 22, 2013 10:30
Show Gist options
  • Save leekelleher/4593646 to your computer and use it in GitHub Desktop.
Save leekelleher/4593646 to your computer and use it in GitHub Desktop.
WordPress plugin to remove the auto-generated meta tags.
<?php
/*
Plugin Name: Remove WP Meta
Plugin URI: http://leekelleher.com/
Description: This plugin removes the auto-generated WP meta tags from each webpage.
Author: Lee Kelleher
Version: 0.1.0
Author URI: http://leekelleher.com/
*/
// remove the unwanted <meta> links
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'wp_shortlink_wp_head');
// remove the X-Pingback header
function remove_x_pingback($headers) {
unset($headers['X-Pingback']);
return $headers;
}
add_filter('wp_headers', 'remove_x_pingback');
?>
@simplesfrancisco
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment