Easy way to clean WordPress head with remove_action()

July 26th 2015

Wordpress LogoWordPress generate lot of unusable think to html header, so we can disable this features with few line of hooks/filters.

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');

First four line disable Emoji (js,css etc). Last three remove line with WP version, RSD meta tag and manifest link. Just add this code to your functions.php file in theme template folder.