Created
October 27, 2016 22:08
-
-
Save waltspence/8716c7e0ab6c451526112df501a9be4c to your computer and use it in GitHub Desktop.
Clean WP Header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************ | |
* Clean up * | |
*************/ | |
// Remove WP Emojis | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// Remove really simple discovery link | |
remove_action('wp_head', 'rsd_link'); | |
// Remove wordpress version | |
remove_action('wp_head', 'wp_generator'); | |
// Remove rss feed links (make sure you add them in yourself if youre using feedblitz or an rss service) | |
remove_action('wp_head', 'feed_links', 2); | |
// Removes all extra rss feed links | |
remove_action('wp_head', 'feed_links_extra', 3); | |
// Remove link to index page | |
remove_action('wp_head', 'index_rel_link'); | |
// Remove wlwmanifest.xml (needed to support windows live writer) | |
remove_action('wp_head', 'wlwmanifest_link'); | |
// Remove random post link | |
remove_action('wp_head', 'start_post_rel_link', 10, 0); | |
// Remove parent post link | |
remove_action('wp_head', 'parent_post_rel_link', 10, 0); | |
// Remove the next and previous post links | |
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); | |
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); | |
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment