Skip Navigation

[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.

You can see a fuller description of the solution here: https://toolset.com/forums/topic/how-do-i-link-a-filtered-category-link-to-a-page-other-than-a-wp-archive/#post-1119062

100% of people find this useful.

This support ticket is created 5 years, 11 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by cristianR-3 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1162411

Tell us what you are trying to do? Have the shop page show parent category, when selected, display subcategories

Is there any documentation that you are following? I could not find anything that I could follow to achieve this.

Is there a similar example that we can see? Yes, although this is a plain vanilla install of WooCommerce with no Toolset implementation. hidden link

What is the link to your site? hidden link

#1162412

I did attempt to implement this on my own before reaching out to your support team. I am not sure what I am missing.

#1162730

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Cristian

I looked at your sample link.

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.

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-productcategory-images

#1162860
Screen Shot 2018-12-10 at 7.49.54 AM.png

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.

#1162867

I am currently working on a copy of the website. I am attempting to everything in place before making editing the live site.

#1162885

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, that moves the goalposts a little.

I answered a similar query not too long ago, where I outlined what is required: https://toolset.com/forums/topic/how-do-i-link-a-filtered-category-link-to-a-page-other-than-a-wp-archive/#post-1119062

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.

If you get stuck let me know.

#1162950

Nigel, it seems exactly what I am looking for. Let me implement it this morning and I will get back to you.

#1163746

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, let me just mark this as awaiting feedback from you.

#1165795

My issue is resolved now. Thank so much you!