I have a custom taxonomy which I want to appear under a custom menu. And I achieved that by specifying the custom menu as the parent. Here's the result:
However, when I click on it, the CSV Tag Upload menu collapses, and the taxonomy opens itself under the Posts menu:
Any idea why this happens and how I can fix it? I've been having this problem for a long time now, but it's becoming a problem now.
EDIT: Code for registering taxonomy:
function csv_tags_taxonomy() {
$labels = array(
'name' => _x( 'CSV Tags', 'taxonomy general name' ),
'singular_name' => _x( 'Tag', 'taxonomy singular name' ),
'search_items' => __( 'Search Tags' ),
'popular_items' => __( 'Popular Tags' ),
'all_items' => __( 'All Tags' ),
'parent_item' => null,
'parent_item_colon' => null,
'edit_item' => __( 'Edit Tag' ),
'update_item' => __( 'Update Tag' ),
'add_new_item' => __( 'Add New Tag' ),
'new_item_name' => __( 'New Tag Name' ),
'separate_items_with_commas' => __( 'Separate tags with commas' ),
'add_or_remove_items' => __( 'Add or remove tags' ),
'choose_from_most_used' => __( 'Choose from the most used tags' ),
'menu_name' => __( 'CSV Tags' ),
);
register_taxonomy('csv_tags','post',array(
'hierarchical' => false,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => true,
'rewrite' => array( 'slug' => 'csv-tags' ),
));
}
add_action('init', 'csv_tags_taxonomy');
register_taxonomy
function, you have registered the taxonomy for posts, that is why it appears under Posts menu.