Add headers to XML Sitemap

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

The following action hook will enable users to add their own directives to the header of the XML Sitemap created by All in One SEO Pack:

add_action( 'aiosp_sitemap_add_headers', 'sfwd_add_sitemap_headers' );

function sfwd_add_sitemap_headers() {
	header( 'cache-control: cache', true );

}

The above code will add the directive cache-control: cache to the header of the XML Sitemap.

[i]
[i]
Skip to toolbar