
Remove Unwanted Crap From The Head Section
- June 30, 2015
- Leave a comment
While working on WordPress, we encounter some common bugs which are needed to be removed immediately to optimize the functionality of the blog/website. There are different ways to get over varying classes of bugs/errors and confronting them thoughtfully can aid in the smooth operating of a website.
WordPress spits out a ton of crap in the document – stuff like the version number and WLW, RSD, and index links. To clean things up, you only need to add the following code snippet into functions.php template file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
// remove junk from head remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); |
User Comments