The only problem that I have found is 'query_var' => 'news'
in register_taxonomy()
. Change it to 'query_var' => true
and it will start working.
function create_my_taxonomies() {
register_taxonomy(
'news_categories',
'news',
array(
'labels' => array(
'name' => 'News Categories',
'add_new_item' => 'Add New Category',
'new_item_name' => "New Category"
),
'query_var' => true,
'show_ui' => true,
'show_tagcloud' => false,
'hierarchical' => true,
'rewrite' => array(
'slug' => 'news'
)
)
);
}
Reference: Codex Register Taxonomy