Custom Taxonomy: Admin Menu Not Selecting Current Item
|Reported by:||sterlo||Owned by:|
Story: Developing a plugin that adds a Custom Post Type and then a Taxonomy.
Problem: Adding the Taxonomy and displaying the Menu Item on the Admin section, when selecting the menu item - there seems to be a difference in functionality depending on what tag the Taxonomy hooks onto.
For example code:
register_taxonomy( 'mytaxonomy', 'myposttype', array( 'labels' => array( 'name' => 'Manage XXX', 'add_new_item' => 'Add New XXX', 'new_item_name' => 'New XXX Name', 'add_new' => 'Add New XXX', 'singular_name' => 'XXX' ), 'public' => false, 'publicly_queryable' => true, 'show_ui' => true, 'hierarchical' => true, 'rewrite' => array( 'slug' => 'XXX', 'with_front' => false ), 'query_var' => 'XXX' ) );
The above code adds the Menu Item for the Taxonomy to the new Custom Post Type menu I created.
When I select the new Taxonomy...it "open" or "behaves" as though it expects to see it under the "post" tag.
It does not select the Taxonomy Menu Item as "current".
Expected result: Select Taxonomy Menu Item -> Menu Item obtains CSS class of "current".
Actual result: Select Taxonomy Menu Item -> Menu Item doesn't obtain a CSS class and IF the Posts menu was "collapsed" it expands.
Now - conversely if I add the Taxonomy Menu Item to the tag "post" - it DOES add the CSS class.
This seems to be inconsistent functionality and I believe that it's not there's something surrounding it that has to be malfunctioning.
Change History (12)
comment:11 follow-up: ↓ 12 wonderboymusic — 8 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed