How to remove junk from your WordPress “head” section

The default WordPress installation has some messy code in it’s “head” section. There’s too much useless meta data and noise that can cause issues, and even lead to security vulnerabilities, like the “generator” tag that informs the world the Wordrpress version you are running. You can clean up the mess by removing the bellow actions (copy and paste the below code to your theme’s functions.php file).

For some reason WordPress’s theme reviewers didn’t allow me to include the above code on Ambrosia theme, so feel free to include it.

3 thoughts on “How to remove junk from your WordPress “head” section”

  1. Although i find these kind of snippets useful, i believe the theme reviewers did the right thing not allowing that to pass along with your theme.

    Don’t get me wrong, but first of all, some of them are really important for some types of sites ( and blogs mostly ).

    And furthermore, i really believe when someone puts a snippet like that in the world ( for WP ) it’s good to explain which line does what. i.e. what is feed_links and what it does exactly, e.g. “outputs generic WP feeds links on the head section”. 😉

  2. Hello there netfreak and thanks for your comment. Well, maybe you’re right about the WP theme reviewers, although I don’t really believe that the above head meta perform really vital tasks… Anyway, some can remove them (I did), someone can leave them, they don’t harm either (except from the wp_generator maybe 😉 )

Leave a Reply