How can I sort products manually using Liquid code?

Hi,

I am going to render some products sorting with title, price, and published_at.

For example, I have an array of product handles like this [“A”, “B”, “C”, “D”]:

I want to show these products with sorting. How can I write it in Liquid code?

Hi @tobychen

Hope you’re having a great day!

Useful resources:

If you found this comment useful, hit the ‘Like’ and ‘Accepted solution’ buttons.