How can I split my collections into sub collections?

aart2000
Excursionist
35 0 7

Theme - Supply

Store - kathiemiller

I want to split a collection into sub collections

Main collection - Original Photorealistic ARt

     Sub Collection - Birds

     Sub Collection - Animals

Main collection - Contemporary Art

     Sub collection - Birds

     Sub collection - Animals

 

I have no idea how to do this.

Replies 3 (3)

Xipirons
Shopify Partner
136 24 30

Hi @aart2000 

 

To split your collections into sub-collections using the Supply theme on your Shopify store kathiemiller.com, you can follow these steps:

 

1. Create the sub-collections:
- In your Shopify admin, go to Products > Collections.
- Click "Create collection" and create a collection for each sub-collection you want, such as "Birds" and "Animals".
- Add the relevant products to each sub-collection.

 

2. Edit the collection template:
- Go to Online Store > Themes and click "Actions" > "Edit code" on your Supply theme.
- Under "Templates", look for a file called `collection.liquid` and open it.
- Find the section that displays the collection title, usually `{{ collection.title }}`.
- Below that, add the following code to display the sub-collections:

 

{% for link in linklists[collection.handle].links %}
{% if link.type == 'collection_link' %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endif %}
{% endfor %}

 

This code loops through the menu items linked to the current collection and displays them as clickable links if they are sub-collections.

 

3. Create a nested menu:
- Go to Online Store > Navigation.
- Click "Add menu" and name it something like "Collection Menu".
- Add a link to the main collection, e.g., "Original Photorealistic Art".
- Hover over that menu item, click "Add", and choose "Collection" to add the sub-collections "Birds" and "Animals" nested under it.
- Repeat for the "Contemporary Art" collection and its sub-collections.
- Save the menu.

 

4. Assign the menu to the collection page:
- Go back to the `collection.liquid` template in your theme code editor.
- Look for a line that includes the menu, e.g., `{% assign main_menu_linklist = linklists[section.settings.main_linklist] %}`.
- Change the menu handle to your newly created "Collection Menu", e.g.:
`{% assign collection_menu = linklists['collection-menu'] %}`
- Save the template file.

 

Now when you view your main collections "Original Photorealistic Art" and "Contemporary Art", you should see the sub-collections "Birds" and "Animals" displayed as clickable links, allowing customers to filter the products.

 

This method utilizes Shopify's nested navigation and collection handles to create a hierarchy of collections and sub-collections without requiring complex customizations to your theme.

 

Let me know if you have any other questions or if you need help.

 

Was this helpful? Like or Accept solution - Buy me a coffee
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed

aart2000
Excursionist
35 0 7

Oh my goodness. I'm not very computer savy. This has my head spinning. I would need some help with this. My biggest fear is messing things up and ending up with a total disaster and not being able to get back out. Especially when it comes to the codes. I won't go near them 😱.  What would you charge to do it for me?

Xipirons
Shopify Partner
136 24 30

Hi @aart2000 

 

I send a private message

Was this helpful? Like or Accept solution - Buy me a coffee
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed