I'm making a theme from the _underscores theme, and after some development there are some empty lines in the header tag that I dont know where are they coming from.

I suppouse that something is loading in wp_head that is generating that empty lines but I cannot figure out what it is.

I inspect my header.php and functions.php without finding any trace of why they are there.

This is what it looks like:

    <meta name='robots' content='noindex,follow' />
<link rel="alternate" type="application/rss+xml" title="Creative Grid System &raquo; Feed" href="http://www.1stheme.dev/?feed=rss2" />
<link rel="alternate" type="application/rss+xml" title="Creative Grid System &raquo; Comments Feed" href="http://www.1stheme.dev/?feed=comments-rss2" />
<link rel="alternate" type="application/rss+xml" title="Creative Grid System &raquo; Front Tiles Comments Feed" href="http://www.1stheme.dev/?feed=rss2&#038;page_id=1821" />

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.1stheme.dev/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.1stheme.dev/wp-includes/wlwmanifest.xml" /> 
<meta name="generator" content="WordPress 4.0" />
<link rel='canonical' href='http://www.1stheme.dev/' />
<link rel='shortlink' href='http://www.1stheme.dev/' />


by the way it is right that wordpress automatically show what version is being used?, what about security!?


The blank lines are probably being generated by code that is hooked to the wp_head action. Generally speaking this is not a big deal as it won't affect the way your page is displayed in a browser. There are some downsides like the size of the HTML document that is transmitted, but this can be solved by using gzip. If you want to remove all the whitespace so that it never makes it to the rendering engine in the browser you can use a plugin that supports minification like W3 Total Cache.

The WordPress version in a meta tag isn't really a security issue because there are other ways to tell what you are running. Security by obscurity is discouraged because it isn't really security. Some plugins like WordFence do give you the option to remove it however.

Worth mentioning that you can do all of the above yourself as well if you feel up to it using the action/filter hooks provided in WordPress.

  • Thank you! I found it, it was Autoptimize plugin. Thank for your advice in security also. Anyway I heard that Wordfence its a little "heavy" plugin.
    – Dedalos01
    Nov 10 '14 at 22:53
  • pick your poison Nov 10 '14 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.