Woocommerce Product Category Parent Category to show subcategories

Posted in: Newspaper
Post count: 24

Hello,

I have a woocommernce shop – I would like to have the parent category pages show only the subcategories instead of the products and have the products only show in their corresponding subcategory pages.

I am unable to figure how to change that since it seems any edit on a parent category affects the subcategories as well (as its affecting all product category pages). The only work around I can think of is to create individual pages for each parent category which is extremely tedious and I feel like I’m likely missing something.

My site is new.phase3rentals.com/wp

Thank you

Post count: 35449

Hi,
I believe that you can do something like that using this structure for products categories -> https://i.imgur.com/HxNIBsw.png then use a cloud template for category shop (you can get it from the cloud), in those make sure that you have the Woo Attribute Filters and Woo Loop -> https://i.imgur.com/YdMpnHf.jpg
I hope this will help you!

Post count: 24

Hi there,

thanks for those tips. I am currently doing/using both of those things.

I have the subcategories all set up and they work great like in your image above and the product category pages use the Woo Loop, but if I go into a parent category, for example, Audio, which has 0 products in it, it shows all the products within my subcategories ->
https://new.phase3rentals.com/wp/product-category/audio/
That makes sense that it does, however, I would like it show a list of my subcategories on the parent category page, like how I have this page ->
https://new.phase3rentals.com/wp/shop-catergories/
This is using the Woo Shortcodes element.
However, if I put that on the parent category page, it will also be on the subcategory pages as well since they use the same layout automatically.
Is there a way to only show the Woo Shortcodes element if its a parent category and only show the Woo Loop element if its a subcategory? Or a way for the parent categories to not use the Product category base (in the permalinks settings)?

I’ve seen this format on a number of websites that use Woocommerce, however I have no idea what theme they are using.

Thanks again!

  • This reply was modified 4 years by phase3av.
Post count: 35449

Hi,
What you can do is to assign on parent product an individual cloud template where to have the subcategories set -> https://i.imgur.com/CpOv3kT.png (this need to be done manually on each parent product), in this way the parents products will display the elements you want and the subcategories will display the products,
I hope this will help you!

Post count: 24

When I opened a parent product page and I did that, it changed all the category pages as well including the subcategories. I also erased everything I had and can’t see a way to get it back..

Post count: 35449

Hi,
If you erased everything from a page or cloud template, then you can use the revision to get the content back -> https://www.wpbeginner.com/beginners-guide/complete-guide-to-wordpress-post-revisions/
I hope this helps you!

Post count: 24

Thank you, I am aware of how to do it form a page or post, but since this was a “product category page”, it’s not an option for me to view or edit under the “pages” or “posts” area from what I can see. I see the “shop” page but that is separate from the “product category” page

Post count: 35449

Hi,
I believe that on https://new.phase3rentals.com/wp/product-category/audio/ the template that is sued is a cloud shop template, isn’t it? If is then, you can revert the theme plate using the revision -> https://i.imgur.com/tLphqjy.png
Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.