Notice: End-of-Life Announcement for all Shopify themes by Barrel > Read More

Close

Control which collections appear on the Collection Listing page

By default, Shopify’s collection listing page shows all collections that are visible in your store. (The “collection listing” page is the page that lives at the URL http://your.store.url/collections).

Some stores only need to show some collections on the collection listing page, but they don’t want to disable all the collections that won’t be appearing on the collection listing page.

Shopify has a tutorial on how to control exactly which collections appear on the collection listing page here. However, we thought that their instructions were a bit confusing, so we’ve created a simplified (and hopefully clearer!) version of their tutorial below, tailored to our Mosaic theme.

To control exactly which collections appear on your collection listing page, follow these steps:

 

Part A: Customize the Theme Code

In Part A, we will change the theme code so that Shopify knows to point your collections listing page to a custom set of collections, instead of their default collection listing page.

1. Go to Edit HTML/CSS to edit the theme code. Shopify has a guide on how to do this here.

2. In the Templates folder, open the file called list-collections.liquid.

3. Around line 24, look for the following lines of code:

 {% for collection in collections %}
   {% include 'collection-grid-item' with 'three-per-row' %}
 {% endfor %}

4. Replace the line of code in red above with the following TWO lines of code, being careful not to delete any lines of code that come after.

{% for link in linklists.all-collections.links %}
{% assign collection = link.object %}

5. Now, this section of code should look like this:

 {% for link in linklists.all-collections.links %}
 {% assign collection = link.object %}
   {% include 'collection-grid-item' with 'three-per-row' %}
 {% endfor %}

Now move to part B. 🙂

 

Part B: Choose the Collections

Now all you have to do is choose the collections that you’d like to appear on your newly custom collection listing page! We’ll do this by setting up a menu that includes all the links to the collections you want to appear.

1. Go to the Navigation tab in your store admin.

2. Click on the Add Menu button on the left.

3. For the name of your new menu, type in “All Collections.” Make sure that the Handle field says “all-collections”.

Screen Shot 2016-01-30 at 11.18.09

4. Now, simply add all of the collections that you would like to appear on your collection listing page to the menu! (Be sure that in the “Link” column, you select “Collection”. Otherwise, it won’t work!)

use-collection-link-not-web-address

5. Save your menu, and you should be good to go!

 

 

That’s it!