[dev] Hide "Select primary category" when radios for category chosen
leymannx opened this issue · comments
I checked out the dev branch for WP5 compatibility and radios appear nicely for the chosen taxonomies.
But when I have chosen radios for category I still get the "Select primary category". I'd expect this select should be hidden, as when selecting a category with radios I can only have one. Which makes that "Select primary category" form element needless.
Is "Select primary category" being added by another plugin? I don't believe that's core. But I'm curious how they are adding it in the document sidebar.
I thought that's core. I have a nearly-vanilla WordPress running. I'll double-check this in an absolutely vanilla WordPress and get back to you.
Ah yeah! You were right. That's Yoast/wpseo. Unfortunately they don't offer an option to switch that off. Maybe radio-buttons-for-taxonomies might offer another option to hide that? 🤔
I think that's gonna be way beyond me. It does look like they are adding a filter to the same spot as my plugin. See here.
Somehow you'll have to find a way to remove that filter.
I tried adding
wp.hooks.removeFilter( 'editor.PostTaxonomyType', 'yoast-seo' );
to my index.js and rebuilding the script, but it broke the rest of it.
I see. Damn!
I guess we should drop that issue for now, what do you think? It should definitely not be a blocker for a new release.