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

I have a custom hierarchical taxonomy that is called 'Categories', but serves a different area of the site than the default "Categories" taxonomy. The problem I'm having is with selecting children terms in the interface while posting content. If the user selects and children terms, they move to the top of the Categories box and lose association and visual hierarchy with its parent. Here's an image showing what happens:

Checked categories are moved to the top of the list, breaking the hierarchy

I haven't set any unusual parameters that I know of, here's the register_taxonomy call:

register_taxonomy( "workshop_categories", 'workshop',
        "label" => "Categories",
        "singular_label" => "Category",
        "rewrite" => true,
        "show_ui" => "true",
        'hierarchical' => true,
        'rewrite' => array('slug' => 'category')

Any input is appreciated!

share|improve this question
up vote 1 down vote accepted

This seems to be normal, it also happens for categories. The wp_terms_checklist(), which creates the checklist, has an argument checked_ontop, enabled by default. The metabox does not override this, so checked categories or custom terms always appear on top of the list. This does not affect their actual hierarchy, only how they are displayed there. It seems the remaining items of the hierarchy, that "lost" their parent, are added to the bottom.

I do not think there is a sensible way to override this, unless you want to duplicate the whole meta box code.

share|improve this answer
I figured as much... bizarre behavior. Oh well! Thanks! – Gavin Oct 28 '10 at 12:08

A bit late, but if anybody comes across this, it's solved with this post here: Hierarchical taxonomy UI

share|improve this answer

Not sure if I can post external links here, but I've just solved this for custom taxonomies or WordPress internal categories.

share|improve this answer

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.