Shopify Sub-Collections: How to Display Nested Categories on Your Collection Pages
Hey store owners! You know the drill. You’re always looking for ways to make your shop easier to navigate, more organized, and ultimately, more appealing to your customers. One common request I hear, and certainly one that sparked a lively discussion in the Shopify Community forums, is about displaying sub-collections directly on your main collection pages.
Our friend Habib_Rayan recently kicked off a thread asking a very specific question: "How to Show Sub-Collections on a Collection Page?" He'd used Shopify's new conditional logic in the Admin to set up sub-collections and wanted to know the Liquid object to display them. This is a fantastic question, especially with Shopify constantly rolling out new features!
The Current Challenge: Shopify's New Sub-Collection Logic Isn't (Yet) for the Storefront
Like Habib, many of you might be excited about the new "collection sources" feature in the Shopify Admin. It lets you define collections based on products from other collections, which is super powerful for product management. However, as the community expert Ploqo pointed out with some deep technical digging, this new logic isn't currently exposed to Liquid on the storefront.
Ploqo's thorough investigation showed that properties like collection.sources, collection.sub_collections, and collection.children all return nothing. Even the Storefront API's Collection object doesn't have this information. It's available in the Admin GraphQL API (2026-07), but that doesn't help us render it directly on your live store pages.
My colleague Maximus3 also weighed in, highlighting that what Shopify calls CollectionSubCollectionSource is more about "membership inherited from another collection" – essentially, a product selection process. It's not creating a true nested collection hierarchy that's easily accessible via Liquid on the frontend. So, the dream of a fully automatic, native Liquid object for these new sub-collections? Not quite there yet.
The Best "Theme-Only" Solution: Metafields for the Win!
Given the current limitations, the community quickly converged on a robust and client-friendly workaround: using collection metafields of type "List of Collections." Both Ploqo and devcoders strongly recommended this approach, and it's truly the cleanest theme-only solution available today.
Here’s how you can set it up, step-by-step:
Step 1: Create Your Metafield Definition
- In your Shopify Admin, go to Settings > Custom data > Collections.
- Click "Add definition."
- Name it something intuitive, like "Sub collections."
- Set the "Type" to "List of collections." This is crucial because it allows you to pick multiple collections.
- Ensure "Storefront API access" is checked.
- Click "Save."
Step 2: Assign Sub-Collections to Your Parent Collections
- Navigate to the parent collection you want to display sub-collections on (e.g., "Furniture").
- Scroll down to the "Metafields" section.
- You'll see your newly created "Sub collections" metafield. Click on it.
- Select the sub-collections (e.g., "Chairs," "Tables," "Sofas") that belong to this parent collection.
- Click "Save." Repeat for any other parent collections.
Step 3: Add Custom Liquid to Your Collection Template
- Go to Online Store > Themes > Customize.
- Navigate to a Collection page template (you might need to select a specific collection from the dropdown at the top).
- In the left sidebar, click "Add section" and choose "Custom Liquid."
Step 4: Paste the Liquid Code
- In the "Custom liquid" box, paste the following code provided by Ploqo (which also includes basic styling):
{%- assign subs = collection.metafields.custom.sub_collections.value -%}
{%- if subs != blank -%}
{%- for sub in subs -%}
{%- if sub.featured_image -%}
{%- endif -%}
{{ sub.title }}
{{ sub.all_products_count }} products
{%- endfor -%}
{%- endif -%}
- Click "Save."
This code will fetch the collections you linked in the metafield and display them as visually appealing cards above your product grid. You can adjust the CSS (like repeat(4,1fr) for the number of columns) to fit your theme's design.
Advanced Tip for Client Usability
Habib's core concern was "client usability." While the metafield solution requires manual linking, Ploqo offered an advanced tip: you can use a custom app to mirror the native collection sources (from the Admin GraphQL API) into your metafield. This way, your client only ever touches the native Collection card, and your app automatically updates the metafield that your theme reads. This takes a bit more development but offers a seamless experience.
Other Ways to Approach Sub-Collections
The community also discussed a few other options, each with its pros and cons:
- Theme's "Collection List" Section: As Joshua827 and sadik_ShopiDevs mentioned, many modern themes (like Dawn) have a "Collection list" section you can add. This works, but you have to manually select each sub-collection, which isn't ideal for large stores or frequent changes.
-
Menu-Based Navigation: Mustafa_Ali suggested using menu links, looping through
linklists['collection-yourhandle'].links. This is a classic workaround, but as Habib pointed out, it's not truly connected to the native sub-collection feature and adds an extra layer of manual management for clients. - Shopify Apps: For a zero-code solution, apps like "Breadcrumbs & Categories," "Collection Tree: Discover," or "Subcollections Tree" can manage and display these relationships for you. This might be a good fit if you're not comfortable with custom code or want more advanced features.
For store owners looking to optimize their online presence and maybe even start a Shopify store with robust category structures, understanding these nuances is key.
So, while Shopify's native sub-collection feature isn't quite ready for direct Liquid access on the storefront, the community has clearly shown that metafields offer a powerful, flexible, and relatively easy-to-implement solution. It gives you the control you need over your store's navigation and presentation, ensuring your customers can find exactly what they're looking for without a hitch. Hopefully, Shopify will expose a native Liquid object for this functionality in the future, but for now, metafields are your best friend!




