How to hide custom taxonomy archives same way as hiding custom post types?

If you set public to false, this taxonomy will get hidden in all places.

So if you want it to be visible in wp-admin, you’ll have to also set show_ui to true – it will show the admin interface to manage this taxonomy.

You can see the full list of params here:
https://developer.wordpress.org/reference/functions/register_taxonomy/

And here is a generator, that may be a nicer way to create code for registering taxonomies/posts:
https://generatewp.com/taxonomy/

Leave a Comment