Skip to content

Instantly share code, notes, and snippets.

@seoagentur-hamburg
Created June 25, 2017 14:44
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save seoagentur-hamburg/84619ca0f39e05b572403fa4ea4a3d19 to your computer and use it in GitHub Desktop.
Save seoagentur-hamburg/84619ca0f39e05b572403fa4ea4a3d19 to your computer and use it in GitHub Desktop.
Header bereinigen
<?php
// Ab hier kopieren
/**
* Befreit den Header von unnötigen Einträgen
*/
add_action('init', 'ah_remheadlink');
function ah_remheadlink()
{
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
//remove_action('wp_head', 'feed_links', 2);
//remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
remove_action('wp_head', 'wp_shortlink_header', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment