Custom Sort Collections Liquid

Custom Sort Collections Liquid

Shopify Partner
1 0 0

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)

Reply 1 (1)

Shopify Partner
489 15 34



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

Click here to Contact and Get Shopify Store Help
We are Shopify Experts   from Ecommerce Small Task Company.