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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #635635

    szymon-0481
    Participant

    Hello,
    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.
    #635640

    szymon-0481
    Participant

    Photos #5 and #6

    Attachments:
    You must be logged in to view attached files.
    #635798

    Hung Pham
    Keymaster

    Hi 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,

    #635887

    szymon-0481
    Participant

    Yes, 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.
Viewing 4 posts - 1 through 4 (of 4 total)