Custom Sort Collections Liquid

Topic summary

Custom sorting a list of collections in Shopify Liquid using a custom field. The goal is to order collections by a custom “sorting” value (letters a–z) rather than the default sort.

The author created a Meta Object field named “sorting” and successfully sorts a Meta Object list using: {% assign sorted_headings = shop.metaobjects.heading.values | sort: ‘sorting’ %}. They report that a similar approach does not work when applied to collections.

No technical solution or code adaptation for collections was provided. The only reply offers private/back-end assistance without sharing a public fix.

Status: unresolved. Key open question: how to sort the collections array by a custom metafield/metaobject property in Liquid on a collections page.

Summarized with AI on December 26. AI used: gpt-5.

I have a page which shows all my collections… But the Sort is currently default and I want to have a custom Sort. For that reason I added a Custom Meta Object Field with the name “sorting” and there I add Letters like a, b, c,… … y, z and I want to sort it that way. How can I sort it?

When I sort a Meta Object List, I can use

{% assign sorted_headings = shop.metaobjects.heading.values | sort: 'sorting' %}

But this code does not work with collections (of course I changed everything)

Hi,

Need to do testing in the backend with code. If you want then you can contact me, details given in signature