Custom Taxonomy Archive Page

I have created a Custom Post Type with the name Product.
I have created a Custom Taxonomy for that post type by the name of products.
That taxonomy have a few terms (printer, keyboard, mouse etc)
I have created a template with the name taxonomy-products.php

If I visit the url example.com/products/printer/ it loads the taxonomy template and correctly displays the posts that are attached to that term.

My problem: if I visit the url example.com/products/ I get a 404 error.

My question: is there a template file for the taxonomy archive page?

1
1

That is how taxonomies works by default in WordPress. There is not an archive page for “All posts that belongs to any term of a taxonomy”. And, conceptually, it is correct.

Imagine you want to list all items of a biological taxonomy system: that is listing all organisms. If you translate to posts, it is what blog and custom post types archives do.

Same applies for core taxonomies, categories and tags, if you go to example.com/category/ or example.com/tag/, you will get a “404 Not found” HTTP code status, which is correct.

If you want to have the URL example.com/products display some content, you can create a page, or a Rewrite Endpoint, and make a custom query for that URL.

Leave a Comment