I am trying to add a custom taxonomy to woocommerce, which I did. It is working nicely. However, WordPress is not displaying it as woocommerce category page. Instead, it tries to load it as a regular archive page. Here is my tax registering part:
add_action( 'init', 'custom_taxonomy_Item' );
// Register Custom Taxonomy
function custom_taxonomy_Item() {
$labels = array(
'name' => 'Bazes',
'singular_name' => 'Baze',
'menu_name' => 'Bazes',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'bazes', 'product', $args );
register_taxonomy_for_object_type( 'bazes', 'product' );
}
I then list the customs tax data as a menu, which links to the tax page (same thing as default wc categories). When I enter the customs tax page, I would like for the content to appear the same way as in default shop category view it appears. Which brings me to the problem. I have no specific template structure, I let WordPress decide which page is wc page and which is wp page. When going to the custom tax page, the system treats it as an archive page, not as wc category page.
Do I need to register the tax as a shop page somewhere?