Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

neulaender commented Jul 25, 2016

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

@robbrownnet

This comment has been minimized.

Copy link

robbrownnet commented Mar 25, 2017

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

@am3000

This comment has been minimized.

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
You can’t perform that action at this time.