How to Cleanup WordPress Extra Things from Header

Imagine entering a cluttered shop which is decorated by unnecessary things, has dust on them and provides excessive and unwanted choices for you to choose from, making your shopping experience hell. This is what a cluttered WordPress Header does for your website, specially if it is an e-commerce one. We’ve all heard how first impressions are the last ones, and this is precisely why you would want to keep your WordPress header clean from unnecessary and extra things. A header is the first thing that loads and users see when your website is visited and if it has a billion links, plugins and other things, the user will be put off by what the rest of the website entails even before letting it load. Not only that, but your website will also take ages to load!

Just like you clean up your shop, the WordPress header also needs to be cleaned in order to save the users’ time in loading the website, helping it look more appealing and turning the browsing experience user-friendly.

There are two ways you can do that. Either revamp the website and ask your graphic designer to come up with a new, cleaner design. Or you can use a code which will help in removing all the mess from your header. This article will explain how you can use the later option.

Instructions

  • 1

    You will first have to log in as an administrator with the Wordpress user name and password you have been given.

  • 2

    The next step is to put this code in your themes function.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

  • 3

    The target market of every website is different, so are the preferences of the website owner. So you will have to pick and choose what you want to show on your Wordpress header and what you need to rid it off.

Leave a Reply

Your email address will not be published. Required fields are marked *


6 − three =