Change the sorting order for the products in a collection doesnt work

The sorting order for the products in a collection does not work. The manual sorting that I set in Products > Collections is not applied in the shop. Is this a bug? Or do I need to adjust something in the code? I use the dawn theme.

Thanks for helping!

Hi there, did you follow the instructions listed in Change the sort order for the products in a collection

If you haven’t modified your Dawn theme then it should default to using your collection’s default sort order. If you followed the steps above, that should be manual.

If you did make code changes to your theme, make sure you are using collection.default_sort_order as documented here.

You can also check the URL for your collection page to see if there is a sort_by query param (i.e. https://<shop_domain>/collections/<your_collection>?sort_by=manual). If there is no sort_by query param, then it will default to the sort order defined in the admin for that collection. If sort_by=manual then it will reflect the collection’s manual sort order. Anything else means that either the order is overwritten by custom theme code of being manually changed in the storefront’s UI picker.

Hope this helps.