I have a custom post type "listings" and I have created a custom taxonomy "listings_category".
Everything works fine except Hierarchical URLS for the taxonomy.
For instance, for standard hierachical wordpress categories we would see:
http://www.domain.com/category/tv/video/
So I want my custom taxonomy to look like this:
http://www.domain.com/listing-category/tv/video/
But wordpress seems to leave out the parent term from the URL, leaving me with:
http://www.domain.com/listing-category/video/
Here is the code I've used to create the taxonomy:
add_action('init', 'create_taxonomies', 10);
function create_taxonomies(){
register_taxonomy(
'listing_category',
array('listings'),
array(
'hierarchical' => true,
'label' => __('Category'),
'sort' => true,
'args' => array('orderby' => 'term_order'),
'rewrite' => array('slug' => 'listing-category'),
)
);
}