Your registration is a bit wrong. You did not provide any of the strings necessary to label you taxonomy correctly. Pass an array to `labels’ like this:
register_taxonomy(
'location',
array( 'post' ),
array(
'hierarchical' => true,
'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' => __( 'Genre' ),
),
'rewrite' => true
)
);
I copied that from the Codex so it is for a “Genre” taxonomy, not your “Locations” one but you should see what needs to happen.
Also, pay attention to the keys. There is no singular_label
that I can see in the Codex. It is singular_name
.