Skip to content

Instantly share code, notes, and snippets.

@oneblackcrayon
Created November 22, 2013 22:31
Show Gist options
  • Save oneblackcrayon/7607990 to your computer and use it in GitHub Desktop.
Save oneblackcrayon/7607990 to your computer and use it in GitHub Desktop.
Remove WordPress Head
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'locale_stylesheet');
remove_action('wp_head', 'noindex');
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'rel_canonical');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_shortlink_wp_head');
remove_action('wp_head', 'wp_generator');
// remove version info from head and feeds
function complete_version_removal() {
return '';
}
add_filter('the_generator', 'complete_version_removal');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment