Hi @monkeypress,
In the past two years TSF moved to supporting as much as possible automatically ??
Now, to revert that process, I believe these filters should do the trick (untested!):
//* This removes SEO metabox, SEO Bar and sitemap support.
add_filter( 'the_seo_framework_supported_post_type', function( $post_type, $evaluated_post_type = '' ) {
if ( 'my_post_type' === $evaluated_post_type ) {
return false;
}
return $post_type;
}, 10, 2 );
//* This adds noindex on the post type pages
add_filter( 'the_seo_framework_robots_meta_array', function( $meta = array() ) {
if ( 'my_post_type' === get_post_type() ) {
$meta['noindex'] = 'noindex';
}
return $meta;
}, 10, 1 );
You can add that to your theme’s functions.php file or a custom plugin. Do not forget to change “my_post_type” to your post type name ??
-
This reply was modified 7 years, 7 months ago by Sybre Waaijer. Reason: Fixed code, had a fatal error