Skip to content

Instantly share code, notes, and snippets.

@seoagentur-hamburg
Created February 23, 2016 19:01
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save seoagentur-hamburg/aceadf06b5e4431dc33d to your computer and use it in GitHub Desktop.
Save seoagentur-hamburg/aceadf06b5e4431dc33d to your computer and use it in GitHub Desktop.
Den Header von WordPress bereinigen
<?php
//emoji aus dem header entfernen
function disable_emoji_dequeue_script() {
wp_dequeue_script( 'emoji' );
}
add_action( 'wp_print_scripts', 'disable_emoji_dequeue_script', 100 );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
// Header Links entfernen
add_action('init', 'remheadlink');
function 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);
}
@neulaender
Copy link

Danke für die Artikelserie und die Code-Schnippsel. Aber wo muss ich diese Datei hinpacken? Oder was muss ich editieren?

@robbrownnet
Copy link

Kann mich der Frage v. neulaender nur anschließen.

@am3000
Copy link

am3000 commented Oct 14, 2018

In die functions.php

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