WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to give a custom post type its own category box?

If I use 'taxonomies' => array("category") or register_taxonomy_for_object_type('category', post_type); I get the desired box but it shows all categories across all post types.

enter image description here

I want the displayed values in the meta box to show just that post types categories.

If I use:

register_taxonomy( 'categories',
    array (
        0 => 'event',
        'hierarchical' => false, 
        'label' => 'Event Categories',
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => array('slug' => ''),
        'singular_label' => 'Event Category'

then I have to manually type tags opposed to being able to click a checkbox to assign categories.

enter image description here

This breaks the UX for less computer savvy people.

Is there a better way?

share|improve this question
I answered based on a "must be" supposition. To improve your Question you should put all the code you are using, i.e.: "(... etc)" is not meaningful. – brasofilo Dec 5 '12 at 21:17
Added the full code for register_taxonomy for archival purposes. Added pictures to help further illustrate the actual question. – tr3online Dec 10 '12 at 21:01
up vote 1 down vote accepted

Create a custom taxonomy (as you have) except change the hierarchical argument to true for the meta box to behave like the default categories taxonomy:

'hierarchical' => true
share|improve this answer
Ahh. Most excellent. Just what I was looking for! Thank you. – tr3online Dec 11 '12 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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