0
votes

I'm building woo commerce online store i'm facing one problem that i'm unable to show sub-categories inside parent category. I try to find plugin or any other solution but i didn't get any thing. All categories are displaying in the main product page i want to show only parent category in the main product page and all sub-categories inside the parent/main category page.

E.g

I have two main categories

  1. Men
  2. Women

And both have subcategories such as t-shirt , apparels , pants etc.

I need to know how to show sub-category inside parent category page.

1
What is it showing right now when you click on parent category?Yatix
Now i had change the Default Category Display to Show sub-categories from woo-commerce setting so now it's showing sub-categories inside parent category but also sub-categories are showing on main shop page where parent categories are showing can you tell me how to hide sub-categories from main shop page ?user2758988
By default shop page shows top level categories OR all products OR both. If its showing top level categories and sub-categories then there must be some custom job done. Try checking Woocommerce shop page template in theme folder.Yatix

1 Answers

0
votes

I have found the solution just add parent="0" in woo commerce product short code at shop page.

[product_categories number="12" parent="0"]