0

I created a custom taxonomy and i want to disable the taxonomy to show on the admin bar below my custom post type. How do i disable it?.

The reason i want to disable is because the user is not allowed to add a category.

1 Answer 1

2

Did you have a look in the Codex? The option your are searching for is 'public'

Just add it as an argument in your call to register_taxonomy() like this:

  $args = array(
    'public'        => false,
    ... [your-other-arguments] ...
  );

  register_taxonomy( 'genre', array( 'book' ), $args );

Docs go here:

public

(boolean) (optional) Should this taxonomy be exposed in the admin UI.

Default: true

http://codex.wordpress.org/Function_Reference/register_taxonomy

1
  • 2
    Thank you! it worked. I should have read the codex before asking. was stupid of me :P Apr 25, 2013 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.