John Jones
John Jones

Reputation: 2265

WooCommerce Remove WordPress Header lines

I am just about to launch an eCommerce site using WordPress and WooCommerce and trying to tidy up the source code and strip out all the WordPress header lines.

The site is pure eCommerce with a blog for users and search engines, I believe the functions below are for a pure blog website.

<link rel="profile" href="http://gmpg.org/xfn/11"/>

<link rel="pingback" href="http://www.domain.co.uk/xmlrpc.php"/>

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.domain.co.uk/xmlrpc.php?rsd"/>

<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.domain.co.uk/wp-includes/wlwmanifest.xml"/> 

Does anyone know what is required from the above for WordPress to function? And how we can remove these from WordPress, if we can?

Thanks Kindly.

J

Upvotes: 0

Views: 926

Answers (1)

rnevius
rnevius

Reputation: 27092

You can safely remove all of these from your header.php file. They aren't required for the site to function.

More info: In HTML5, the "profile" attribute was dropped.

The others are purely optional.

For de-registering the bottom two, you'll need to add some new lines to your functions.php:

remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');

These functions, from the wp_head action hook, can be viewed in wp-includes/general-template.php, starting on line 2190.

From this file, rsd_link "display(s) the link to the Really Simple Discovery service endpoint."

The wlmanifest_link "display(s) the link to the Windows Live Writer manifest file." If you don't use Windows Live Writer, there's no need for this.

Upvotes: 1

Related Questions