Opened 4 years ago

Last modified 3 years ago

#10122 closed task (blessed)

create metaboxes for hierarchical taxonomies — at Version 6

Reported by: nicomollet Owned by: filosofo
Priority: normal Milestone: 3.0
Component: Taxonomy Version: 2.8
Severity: minor Keywords: has-patch
Cc: mpretty@…, epicalex, sirzooro, scribu@…, ricky@…

Description (last modified by dd32)

edit by dd32:

The posts page only contains metaboxes for flat taxonomiese (non-hierarchical ones). It should also support custom taxonomies which are parent-child(hierarchical).


original desc from nicomollet:

WP2.8 new taxonomy features make us create new taxonomies. Example in http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28

You can make new taxonomy tags "Animals" with this simple line of code :

register_taxonomy( 'animals', 'post', array( 'hierarchical' => false, 'label' => 'Animals' ) );

But it seems possible to create new taxonomy categories, like "Rating" (G, PG, PG-13, R, NC-17) with :

register_taxonomy( 'rating', 'post', array('hierarchical' => true,  'label' => 'Rating') );

This last line of code does nothing at all. It is supposed to work ? Maybe it needs to be implemented.
Thanx

Change History (6)

I may precise that the last line of code

register_taxonomy( 'rating', 'post', array('hierarchical' => true,  'label' => 'Rating') );

does not create "automatic meta boxes" and "manage screens" like "hierarchical => false" does.

  • Keywords needs-patch added
  • Milestone changed from Unassigned to 2.9

I suspect it's by design - the hierarchical attribute would imply that the rating can't be added as a tag.

  • Milestone changed from 2.9 to Future Release

comment:4   ryan4 years ago

This is by design. Support for categories will be added later.

Any chance of this making it into 2.9?

comment:6   dd324 years ago

  • Description modified (diff)
  • Summary changed from register_taxonomy only for tags, not for categories ? to create metaboxes for hierarchical taxonomies

Any chance of this making it into 2.9?

I'm working on something like that, but no guarantee's if it'll make it into any version.. Is anyone else even attempting that?

Note: See TracTickets for help on using tickets.