Leadhood
Leadhood

Reputation: 25

Show multiple product categories woocommerce

I've been trying to display multiple product categories on the shopping page.

For instance if I open the following url:

woocommerce/?product_cat=shirts

This will show me all the shirts. well thats nice, but I also only like to see all the blue shirts.

woocommerce/?product_cat=blue

What file do I need to edit to make me select multiple categories? or should I select multiple product categories an other way?

I was looking for a solution like this:

woocommerce/?product_cat=shirts|blue

the link would be changed from a form on top of the shopping page with check boxes. I think that would make a very nice way of sorting products.

Upvotes: 2

Views: 4662

Answers (3)

Pila
Pila

Reputation: 5852

What worked for my case was https://findfitness.store/shop/?product_cat=accessories,electronics-gadgets,category3

Where:

  • accessories
  • electronics-gadgets
  • category3

Are the slugs of the various categories.

Upvotes: 1

Manuel Ragazzini
Manuel Ragazzini

Reputation: 909

This is the solution that you looking for:

?product_cat=shirts+blue

Upvotes: 1

Chitkaran Singh
Chitkaran Singh

Reputation: 1

Here's your solution mate

[product_categories number="" orderby="name" hide-empty="1" parent="0"]  

Upvotes: 0

Related Questions