Skip Navigation

[Resolved] Using Widget to display links (menu) to Products, Sub-categories and Categories

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by NicG2812 7 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#486613

I have products in categories and sub categories and am using the "WooCommerce Product Categories" Widget to display the hierarchical list of categories, sub-categories and products in a sidebar.

When I click on the lower most sub-category, the list of products is displayed using a View. However if I click on a sub-category above that level, that is, a sub-category (or top category) that contains other sub-categories, then I get a 404 page.

Main Category
- Sub-Category A
- Sub-Category 01
- Sub-Category B
- Sub-Category 02
- Sub-Category 03

When clicked, sub-cat 01, 02 and 03 will show products, however the main category and sub-cat A and B will give a 404.

Within Toolset I have created an entry for WordPress Archives. In the Loops Section I have selected "Product Categories" in the Taxonomy Archives section. It does say "This archive will include Products only". I imagine that this is part of the problem.

The question is, how can I get the View, which displays the simple table of products, to work when there are products from several sub-categories?

I did read some of the other topics that I felt might be relevant and did quickly and briefly try some of the ideas, however nothing changed. This topic seemed the most promising https://toolset.com/forums/topic/woocommerce-category-archive-doesnt-work-with-both-products-and-sub-categories/. However as it wasn't quite what I was looking for I found it difficult to extract the information that would work for my situation.

As the links with in the Widget seem to be formatted in a way that makes sense, I imagine that the problem must be related to getting Views to combine products from multiple categories.

Your help would be very much appreciated.

#486844

Hi Nic,

It should be possible to display product category archives regardless of the hierarchy. The results displayed should reflect products within a category, or within any of its subcategories. For instance:

Main Category
- Product: Membership
- Sub Cat A
---Sub Cat 01
------Product: Product One

In this case, the /product-category/main-category archive should display both Membership and Product One. The /product-category/sub-cat-a archive should show Product One, as well as the /product-category/sub-cat-a/sub-cat-01 archive.

Have I understood the need correctly?

Try to trigger an update for your permalinks by going to wp-admin/options-permalink.php and clicking Save Changes, then see if your URLs behave better. If this does not work, please let me know your Product Category permalink settings: Settings > Permalinks > Product Permalinks.

#489437

Thanks Christian. I have been able to find a way of displaying the categories without using Toolset. This is working at the moment, however I'll come back to you if I need to explore this route again.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.