I added this custom taxonomy to Woocommerce, it's very standard from woothemes documentation. I need Woocommerce to check if what is currently being viewed is a range taxonomy e.g./product-range/fairy-falls/ then this template needs to be used: archive-product-ranges.php which is located in my main theme folder under woocommerce (fortblanket/woocommerce/archive-product-ranges.php)
Here is the taxonomy i added to functions.php:
add_action( 'init', 'create_ranges_taxonomies', 0 );
function create_ranges_taxonomies() {
$labels = array(
'name' => 'Product Ranges',
'singular_name' => 'Product Range',
'menu_name' => 'Product Ranges',
'all_items' => 'All Ranges',
'parent_item' => 'Parent Range',
'parent_item_colon' => 'Parent Range:',
'new_item_name' => 'New Range Name',
'add_new_item' => 'Add New Range',
'edit_item' => 'Edit Range',
'update_item' => 'Update Range',
'separate_items_with_commas' => 'Separate Range with commas',
'search_items' => 'Search Ranges',
'add_or_remove_items' => 'Add or remove Ranges',
'choose_from_most_used' => 'Choose from the most used Ranges',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'product-range' ),
);
register_taxonomy( 'product_range', 'product', $args );
register_taxonomy_for_object_type( 'product_range', 'product' );
}
I have tried so many bits of code from all over the place, I can't seem to get this right :(