@duttoluca
I think you need to go to All In One SEO -> General Settings and then the Advanced tab.
Where it says “Post Type Columns”, uncheck the box and then individually selected the post types you need SEO for.
Thank you.
But they’re unchecked already in my sites…
Hey @duttoluca,
We took a different direction with the new version of the plugin and you are correct that SEO is now enabled by default for all post types. We do have a filter you can use to disable it – https://aioseo.com/docs/aioseo_disable/
Out of curiosity, is there a reason why your clients only want SEO for some but not all post types? If it’s just a matter of the metabox showing where it shouldn’t, then you can simply toggle this under Content Types > Post Type > Advanced.
– Arnaud
Thank you @arnaudbroes
The metaboxes are the problem indeed. In the previous version I configured some content types to have their AIOSEO metabox hidden, now they’re visible again for every content type.
Your suggestion to use Content Types > Post Type > Advanced is what I’m searching for…
But: since I’m working in a multisite with a lot of subsites, is there a way (maybe updating something in wp_xx_options via SQL?) to hide the metabox for a given post type in every site?
I mean: I want to hide the AIOSEO metabox for content type ‘foobar’ in 100 subsites without having to do it manually in the backend…is there a clever way to do that?
Thanks
@duttoluca if you install the Code Snippets plugin in your network admin, you should be able to add code snippets that run on every site in your multisite installation. If that works for you, then I can draw up a code snippet for you that does this.
Yes, I can install that plugin.
Or, maybe better, I could run some code from my functions.php…
Thank you very much
You should be able to use this –
add_filter( 'aioseo_disable', 'aioseo_disable' );
function aioseo_disable( $disabled ) {
$disabledPostTypes = array( 'postType1', 'postType2', 'postType3' );
if ( is_singular() ) {
$post = get_post();
if ( is_object( $post ) && in_array( $post->post_type, $disabledPostTypes, true ) {
return true;
}
}
return false;
}
You’ll obviously need to replace the values in the array with the slugs of the post types you want to disable AIOSEO for.
Thank you very much, but this code doesn’t seem to work: the aioseo metabox is still visible even if I put the slugs of the post types to disable in $disabledPostTypes…