By default, WordPress generates lots of Meta tags into the header of our website. This Meta tags won’t hurt our website, but this bunch of codes is useless and will just add a couple of size in our site. Keeping these tags will also make our website structure unprofessional and untidy.

Generally speaking, our website does not need this Meta tags and if there is a way of removing this tags then why should keep it?

Fortunately, WordPress added this Meta tags by add_action() hook so it can also be removed using remove_action() by the associated action name and its priority.

The Code

We gathered some of the actions associated with some useless Meta tags. Copy and paste the code below into your theme or child theme’s functions.php.

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);
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);