Opened 7 years ago
Closed 7 years ago
#41814 closed defect (bug) (duplicate)
Custom taxonomy count shows wrong value
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | administration | Cc: |
Description
This ticket is not an exact duplicate of #20708.
I created a custom taxonomy called media-content-category and added three terms to it. Each term has at least one image attached. But wp-admin/edit-tags.php?taxonomy=media_content_category
is showing wrong counts.
However, /wp-admin/upload.php?media_content_category=post-header-image&post_type=attachment
shows correct number of attachment(s) for each taxonomy term.
This is how I created my custom taxonomy:
<?php function emfl_media_content_taxonomy() { $labels = array ( 'name' => _x('Media Content Categories', 'Media Content Categories'), 'singular_name' => _x('Media Content Category', 'Media Content Category'), 'search_items' => __('Search Media Content Categories'), 'all_items' => __('All Media Content Categories'), 'parent_item' => __('Parent Media Content Category'), 'parent_item_colon' => __('Parent Media Content Category:'), 'edit_item' => __('Edit Media Content Category'), 'update_item' => __('Update Media Content Category'), 'add_new_item' => __('Add New Media Content Category'), 'new_item_name' => __('New Media Content Category Name'), 'menu_name' => __('Content Category') ); register_taxonomy('media_content_category', array('attachment'), array ( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug', 'content_category') )); } add_action('init', 'emfl_media_content_taxonomy', 0);
Please see screenshots.
NB: No plugin is activated.
Attachments (4)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Showing wrong counts