[Resolved] I want to organize the store front by product categories/subcatogiries
This thread is resolved. Here is a description of the problem and solution.
Problem:
How to navigate WooCommerce products by first showing the parent product categories which then link to a page which shows the sub-categories and matching products, going as many levels deep as there are levels of sub-categories.
Solution:
You first need an initial taxonomy View to display only the top level product categories as links to their respective archives. (It will include a Query Filter for parent product category is none, meaning only the top-level categories are returned.)
You then create a custom product categories archive to display products for that category.
At the top of that custom archive you insert another View, much like the first, but this time to display the child product category links, achieved using a Query Filter where the taxonomy parent is set by the current archive page.
To clarify, you specifically want to display the product categories on the *shop* page, and you don't want to display anything else (i.e. products generally), you want the users to select a category and be taken to the relevant product category archive, is that right?
You would need to create a custom archive for the shop page normally, which outputs nothing.
Before the loop itself you would insert a View to display the product categories as links.
So, make a new View where the content selection is the product category taxonomy.
In the output section use the wpv-taxonomy-link shortcode to create a link to the product category archive.
If your product categories have images, you can output those using the wpv-woo-productcategory-images shortcode, though you will probably want to generate your own links so that the images are clickable using the wpv-taxonomy-url shortcode.
Ok, I am still not getting the correct result. I believe I got the part of creating the Archive, that outputs nothing. I inserted a View before the loop to display the category links. It is using the product category taxonomy. But I still have two issues. One, all categories and subcategories are being displayed. I can filter by term and select only the parent categories, but when clicked on their link, I get products, not subcategories.
Included is an image of how I set up the Shop Archive page.
Could you check that and see if you understand and are able to implement it?
You have the initial View to display only the top level product categories as links to their respective archives.
You create a custom product categories archive to display products for that category.
At the top of that custom archive you insert another View, much like the first, but this time to display the child product category links, achieved using a Query Filter where the taxonomy parent is set by the current archive page.