I have a Custom Post Type (Reviews) and it has two Custom Taxonomies (Genres and Authors).
When adding/editing a Review it shows the admin tools for editing the Genres (like categories) and Authors (like tags). That's good.
But when adding/editing a standard Post, the Categories tool lists both standard Categories and my Genres, all mixed together. And the Tag tool autocompletes with a mixture of standard Tags and my Authors. That's bad.
How can I stop Categories and Tags pulling in the custom taxonomies?
Here's how I define the Genres; the Tags are similar:
function pg_genres_init() {
$labels = array(
'name' => _x( 'Genres', 'taxonomy general name' ),
'singular_name' => _x( 'Genre', 'taxonomy singular name' ),
'search_items' => __( 'Search Genres' ),
'all_items' => __( 'All Genres' ),
'parent_item' => __( 'Parent Genre' ),
'parent_item_colon' => __( 'Parent Genre:' ),
'edit_item' => __( 'Edit Genre' ),
'update_item' => __( 'Update Genre' ),
'add_new_item' => __( 'Add New Genre' ),
'new_item_name' => __( 'New Genre Name' ),
'menu_name' => __( 'Genres' ),
);
register_taxonomy(
'pg_genres',
'pg_review',
array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array(
'slug' => 'reading/genre',
'with_front' => false
),
)
);
}
add_action( 'init', 'pg_genres_init', 0 );