Home › Forums › WoodMart support forum › How to create sub-category archive for specific categories that have subcategory
How to create sub-category archive for specific categories that have subcategory
- This topic has 7 replies, 2 voices, and was last updated 2 months, 2 weeks ago by
szymon-0481.
-
AuthorPosts
-
February 5, 2025 at 3:09 pm #635635
szymon-0481ParticipantHello,
I have 11 categories in my shop.
Many of them have subcategories.
I have two separate product archive views:
1. For these categories that have no subcategories, I’m displaying product list right away (photo #1)
2. For these categories that have subcategories, when you choose such main category in the category filter (photo #2) it shows a different view – sub-category archive. (photo #3)
What I need advice in:
For now, I have achieved it in such way:
-Different Layout for “product archive” (standalone categories)
-Different Layout for “sub-category archive” (categories with subcategories) (Photos #4 and #5)
-In “sub-category” archive I’ve added “product categories” -> custom query -> Here I’ve selected by hand all the sub-categories to show for certain category (for example: 07.01, 07.02, 07.03… to appear under 07. main category) (Photo #6)
The problem is: That way I would need to create XX-number of separate Layouts for every single category that has sub-categories and custom query all of the given sub-categories one by one.
Is there any way to make it automatic so that I use only two Layouts: for standalone categories and for these with subcategories and make them show certain subcategories for a given main category?
Thank you!Attachments:
You must be logged in to view attached files.February 5, 2025 at 3:10 pm #635640
szymon-0481ParticipantPhotos #5 and #6
Attachments:
You must be logged in to view attached files.February 6, 2025 at 8:04 am #635798
Hung PhamKeymasterHi szymon-0481,
Thanks for reaching to us.
Can you please create layout which applies to all subcategories and use
Exclude
condition for non-subcategories?Best Regards,
February 6, 2025 at 1:16 pm #635887
szymon-0481ParticipantYes, it is doable but…
That way I’m unable to separate subcategories attached to the given main category.
Precisely speaking, when using custom query, I’m attaching certain subcategories to appear under certain main category, as in the attached photo.
If I pin all of them (subcategories) at one Layout’s query, they will appear under every each of the main categories.Attachments:
You must be logged in to view attached files.February 7, 2025 at 6:51 am #636119
Hung PhamKeymasterHi szymon-0481,
I’ve passed this topic to one of our developers for more details, and I will let you know once get an answer.
Thanks for your patience.
Best Regards,
February 7, 2025 at 11:19 am #636201
szymon-0481ParticipantOk, thank you.
Waiting for the reply.February 7, 2025 at 1:04 pm #636258
Hung PhamKeymasterHi szymon-0481,
There are 2 ways to solve this in the settings:
– In the Product categories setting of the widget, you can select Data source -> Woocommerce query.
– In the condenser settings, you can select Child product categories https://monosnap.com/file/LlO5Oo95axUK7lsUI3GPWq6mn1oZtJ
Regards,
February 11, 2025 at 2:04 pm #637179
szymon-0481ParticipantHello,
The correct way was to choose “woocommerce query” and then in the condenser settings “include” -> “product term (category, tag, attribute)” and in the third column I chose a category that has subcategories. So as many “include” conditions are needed as there are categories with subcategories in them. That way woocommerce sees it correctly – displaying all available subcategories for each main category (subcategory grid instead of standard product archive for the given categories).
Thanks, solved.
Please close this topic.Attachments:
You must be logged in to view attached files. -
AuthorPosts
The topic ‘How to create sub-category archive for specific categories that have subcategory’ is closed to new replies.
- You must be logged in to create new topics. Login / Register