Custom Sort Collections Liquid

Custom Sort Collections Liquid

trinkermedia
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)

Small_Task_Help
Shopify Partner
830 28 74

Hi,

 

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

To Get Shopify Experts Help, E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad