WordPress Tip: How to Flushout wp_head() Without Using a Plugin

x theme

You already know what wp_head() is, if you are aware of WordPress theme development. If you are beginner, first take a look at this doc.

wp_head() hook for WordPress adds a lot of things in our WordPress themes. But sometimes, you notice that anything, coming through wp_head() hook is not necessary for your website. So now you are searching on the internet for a plugin to clean up or remove unnecessary code. Now stop, following is a code through which you can easily remove the things you don’t want, coming through wp_head(). Use the code in your functions.php.

remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'adjacent_posts_rel_link' );

If you want to remove wp_head() with a plugin, you can use Clean Up wp_head() Plugin.

Leave a Reply

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