Exclude post type archives from XML Sitemap

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

Buy Now

In All in One SEO Pack v2.8 (All in One SEO Pack Pro v2.9) we added support for post type archives in the XML Sitemap.  The following API filter can be used to exclude a specified post type archive from the XML Sitemap:

add_filter( 'aiosp_sitemap_include_post_types_archives', 'my_exclude_post_types_archives' );
function my_exclude_post_types_archives( $types ) {
// to exclude an archive page of type 'xxx'
unset( $types['xxx'] );
return $types;
}
[i]
[i]
Skip to toolbar