WordPress: Clean Up Your Website head section

If you take a look at the source of your WordPress site you will see loads of attributes in your head section and think why do I need them? WordPress and plugins will automatically add things in your wp_head() or wp_footer() that you don’t really need. This doesn’t have a major affect on your website, although it can slow it down a little (especially if you have lots of CSS and JavaScript included).

There is a great plugin called Head Cleaner that has an interface where you can remove everything you don’t want. Be careful though, as some things are needed to make your plugins work. This plugin is handy if you want to bundle JS or CSS in your own files and remove the links created by the plugins.

If you don’t really want to mess with plugins, JS & CSS and just want to remove the stuff created by WordPress, simply copy and paste the following code into your themes functions.php file.

remove_action( 'wp_head', 'feed_links_extra'); // Display the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links'); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link'); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10); // Display relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator'); // Display the XHTML generator that is generated on the wp_head hook, WP version
Free Graphics, Icons, Tutorials
Free Graphics Free Christmas Vector Icon Graphics Pack 2017Free Fitness Vector Icons Graphics PackFree Camping Vector Graphics PackFree Summer Graphics PackFree File Icon PackFree Fast Food Vector Graphics
Sharing is caring...
Like & Follow
Share the love, share this page! Facebook Twitter Google Digg Reddit LinkedIn Pinterest Email
Close [X]
The Web Taylor
1000 Lakeside North Harbour Portsmouth, Hampshire PO6 3EN
02392 123358