I’m having major difficulty getting a Woocommerce Category archive to work properly. We have 2 layers of categories (so top level categories, and sub-categories), and I just want to create an Archive page that shows the top level categories, which when clicked show the sub-categories, and then when they are clicked you see the products within that sub-category. There may at some point be a third layer of categories as well.
I’ve tried following Creating dynamic WooCommerce archive pages – Bricks Academy and a number of other guides, but whatever I do, it just shows all categories. I’ve set the parent to “{echo:get_queried_object_id}”, but this still shows all categories and sub-categories. I can set the parent to ‘0’, and it then only shows the top level categories, but then it obviously still shows the top level categories when you click through to the next level.
I feel like I must be missing something obvious, as i’m sure this shouldn’t be so tricky! It seems like it is fairly basic, normal Woocommerce behaviour but I can’t get it to work. Any ideas what I’m doing wrong?
Here’s a screenshot showing the query. This doesn’t have the products on at present, as I am just trying to get the categories working for now:
The top level categories here are Couplings and Valves, Hydraulics and Spill Kits. The other 3 are subcategories of them.
Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: (Products – Spire Fluid Power)