I don’t quite understand how to link to my taxonomy templates. Do I need to make a page-tempalte and query my terms from there? I’m using the taxonomy hierarchy currently:
Taxonomy
$labels = array(
'name' => __( 'Product Categories' ),
'singular_name' => __( 'Product Category' ),
'search_items' => __( 'Search Product Categories' ),
'all_items' => __( 'All Product Categories' ),
'parent_item' => __( 'Parent Product Category' ),
'parent_item_colon' => __( 'Parent Product Category:' ),
'edit_item' => __( 'Edit Product Category' ),
'update_item' => __( 'Update Product Category' ),
'add_new_item' => __( 'Add New Product Category' ),
'new_item_name' => __( 'New Product Category' ),
'menu_name' => __( 'Product Categories' ),
);
$args = array(
'labels' => $labels,
'show_in_nav_menus' => false,
'hierarchical' => true,
'rewrite' => array('slug' => '/products', 'with_front' => false),
);
register_taxonomy( 'protax', 'product', $args );
Then I have a taxonomy template : taxonomy-protax.php
which I should be able to get to via www.mywebsite.com/products
but it keeps leading to 404. Taxonomy template always seem to give me the most trouble… How do I view my taxonomy-protax.php
page?
According to the Codex:
What I do when using custom taxonomy/custom post types is exactly what you mentioned in the second sentence. Make a page template and a page in the back end. Choose the template you built as the template to use when making your page.
EDIT
Just noticed that you’re getting a 404. In that case, check your permalink structure as well.
Again, from the Codex: