If you have large collections, you might want to let your customers change the order in which collection contents are displayed. You can do this by adding a sort order drop-down menu to your collection pages.
Demo
You can view a demo of this customization at the-new-standard-theme.myshopify.com.
To create the sort order drop-down menu, you will need to add code to your collection.liquid template.
-
From your Shopify admin, click Online Store, and then click Themes (or press
G
W
T
). -
Find the theme you want to edit, click the
...
button, and then click Edit HTML/CSS. -
Under the Templates heading, click collection.liquid to open your collection template in the online code editor.
Tip
If you're using the Brooklyn theme, click collection-template.liquid instead.
-
In a new browser tab, go to this gist file.
-
Copy the contents of this gist file.
-
Back in your admin, paste the code where you would like the sort order drop-down menu to appear on your collection page.
Tip
For Brooklyn, paste the code directly above the
{% if settings.collection_tags_enable %}
code in collection-template.liquid. -
Save your changes.