Mastering Shopify Subcollections: A Community Guide to Dynamic Product Displays
Hey there, fellow store owners! Let's talk about something that can be a real head-scratcher for many of us: organizing our products into neat, nested categories, especially when it comes to subcollections on Shopify. It's a common desire to have a main collection page that showcases its subcategories, and then for those subcategories to simply display their products.
I recently saw a fantastic discussion in the Shopify community, sparked by swarique, that really hit home for a lot of merchants. Swarique was trying to set up a structure where, for example, a "Women Jewellery" page would show subcollections like "Necklace" or "Bracelets." The goal was that when you clicked on "Necklace," you'd just see the products in that collection, not the subcollection menu again. The real challenge came when they had multiple parent collections (like "Everyday Elegance" and "Party Glamour") using the same custom template, and they ended up displaying the exact same set of subcollections!
This is a super common scenario, and the community really dug in to offer some great solutions. Let's break down the best ways to tackle this, drawing from their insights.
The Core Dilemma: Shared Subcollection Content
Swarique's main issue, as clarified with screenshots, was this: After setting up a "Women Jewellery" template and assigning parent collections like "Everyday Elegance" and "Party Glamour" to it, the subcollections displayed on both pages were identical. So, if "Everyday Elegance" showed "Daily wear Necklace," "Party Glamour" would also show "Daily wear Necklace" instead of its own specific subcategories. Changing one meant changing the other. This happens because the custom template itself isn't dynamically pulling the correct subcollections for the specific parent collection you're viewing.
There was also the related problem of clicking into a subcollection like "Necklace" and still seeing the subcollection menu, rather than just the product grid. Let's tackle both of these head-on.


Solution 1: The Modern & Scalable Way with Metafields & Dynamic Sources
This approach, detailed by Tim_1 in the thread, is really the most flexible and future-proof way to handle dynamic content like subcollections. It uses Shopify's powerful metafields.
Step-by-Step Guide:
-
Create a Collection Metafield:
- Go to your Shopify Admin > Settings > Custom data.
- Select "Collections" and click "Add definition."
- Name it something descriptive, like "Sub Collections."
- Crucially, set the type to "List of collections." This allows you to link multiple collections.

-
Populate the Metafield for Each Parent Collection:
- Go to Products > Collections in your Shopify Admin.
- Open a parent collection (e.g., "Everyday Elegance").
- Scroll down to the "Metafields" section. You'll see your new "Sub Collections" metafield.
- Click on it and add only the specific subcollections that belong to this parent collection. For "Everyday Elegance," you'd add "Daily wear Necklace," "Daily wear Rings," etc.
- Repeat this for "Party Glamour," adding its own unique subcollections. This is the key to separating content!
-
Use a Dynamic Section in Your Theme Editor:
- Go to Online Store > Themes > Customize.
- Navigate to one of your parent collection pages (e.g., "Everyday Elegance") in the theme editor preview.
- Add a "Collection list" or similar section (Tim_1 specifically mentioned "Collection list/links: XXX" as one that can use this type of metafield).
- In the section's settings, look for an option to select a dynamic source. Choose your newly created "Sub Collections" metafield.


-
Pro Tip: Hide Empty Sections with Custom Liquid: If a collection doesn't have subcollections assigned to its metafield, the section might show placeholders. Tim_1 shared a clever Liquid snippet to hide this section if the metafield is empty. You'd add a "Custom liquid" section *just above* your "Collection list" section in the theme editor and paste this code:
{% # my metafield is set up with this namesapace and key -- amend for yours %} {% if collection.metafields.custom.sub_collecitions and collection.metafields.custom.sub_collecitions.value.size > 0 %} {% else %} {% endif %}Remember to adjust
collection.metafields.custom.sub_collecitionsto match your specific metafield's namespace and key.
Solution 2: Leveraging Shopify Navigation Menus (The "Pro Way")
Emily chimed in with a fantastic suggestion that's often overlooked: using Shopify's built-in navigation menus. This can be a more user-friendly way for non-developers to manage subcategories without diving deep into metafields or code.
How it Works:
-
Create Specific Menus: Go to Online Store > Navigation. Create a separate menu for each of your parent collections (e.g., "Everyday Elegance Menu," "Party Glamour Menu").
-
Populate Menus: Add the relevant subcollections as menu items to each respective menu.
-
Liquid Code in Your Template: In your custom collection template, you'd use Liquid code to dynamically look up the menu that matches the current collection's handle. For instance, if your collection handle is
everyday-elegance, the code would look for a menu named "Everyday Elegance Menu" and display its links. This requires a bit of theme customization, but once set up, managing your subcollections becomes as simple as updating a menu.
Essential Template Management: Avoiding the "Same Menu" Loop
This was a crucial point brought up by Emily and directly addresses swarique's initial problem of clicking into "Necklace" and seeing the subcollection menu again instead of just products. The solution is straightforward:
- Check Your Template Assignments: For any collection that should only display products (like "Necklace" or "Bracelets"), make sure its Theme template is set to Default Collection in the collection's settings (Products > Collections > [Your Sub-Collection]). Your custom "Sub-list" or "Women Jewellery" template should only be assigned to the parent collections (like "Everyday Elegance" or "Party Glamour") that are meant to display other collections.
This ensures that once a customer clicks past the initial subcollection listing, they land on a standard product grid, as expected.
Handling Related Products: Keep it Simple!
Both swarique and Emily mentioned the need for related/recommended products. Good news here: you don't need complex custom templates for this! Shopify has excellent built-in functionality:
- In your Theme Editor (Online Store > Themes > Customize), simply navigate to a product page or collection page.
- Add the "Related Products" or "Product Recommendations" section to your Default Product and Default Collection templates. Shopify's logic is pretty smart and will automatically suggest relevant products based on tags, types, and customer browsing behavior.
A Note on Custom Templates vs. Pages
Maximus3 mentioned that some competitors use pages instead of collection lists (e.g., /pages/womens-jewelry pointing to /collections/necklaces) or duplicating collection list templates. While these are technically possible, Tim_1 rightly warned that the total number of templates is limited, making dynamic sources (like metafields or navigation menus) a much more scalable and maintainable solution in the long run. Creating a separate template for every single category can quickly become cumbersome and hard to manage.
So, while the idea of dynamic subcollections might seem a bit tricky at first, the Shopify community has shown us some really effective ways to achieve it. Whether you lean towards the robust metafields and dynamic sources, or prefer the easier management of navigation menus, the key is to ensure your template assignments are correct and that your content is truly dynamic. This way, you'll provide a seamless, intuitive shopping experience where customers always find exactly what they're looking for, without seeing the same content repeated across different categories. It’s all about setting up that smart connection so your store's structure works for you, not against you!