Hi @dkpminus,
CPT support:
Each supported CPT will have SEO settings on their pages and terms, to allow setting “noindex”, among other things.
Using the “noindex” option on any page, post, or CPT post, will exclude it from the sitemap, too. It will save you the trouble maintaining the filters below.
Adjusting all posts on CPT:
Adding global options that affect all posts from a CPT is something we’re still evaluating. This consideration will probably be postponed until we work on a redesigned interface.
In the meantime, you can use filters, like:
add_filter( 'the_seo_framework_robots_meta_array', 'my_robots_adjustments', 10, 1 );
function my_robots_adjustments( $meta = array() ) {
// Set noindex and nofollow on WooCommerce products.
if ( is_singular() && 'product' === get_post_type() ) {
$meta['noindex'] = 'noindex';
$meta['nofollow'] = 'nofollow'; // why do you use nofollow!?
}
return $meta;
}
Like the filter above, not all filters are considered by the SEO Bar. This is something we’re working on by standardizing every single feature; so, the administrative interface might not reflect your use of filters.
Remove all posts of a CPT from sitemaps:
To exclude certain post types from the sitemap, use this filter:
add_filter( 'the_seo_framework_sitemap_exclude_cpt', function( $post_types = array() ) {
$post_types[] = 'product'; // Excludes WooCommerce products.
return $post_types;
} );
I hope this helps ?? Cheers!