I want to add a new sort option in the collections page sort by

Topic summary

A user wants to add a custom sort option to their collection page dropdown based on a product metafield (custom.product_class) with values “Premium” and “Regular”.

Attempted Solution:

  • Added new option values to en.default.schema.json
  • Modified main-list-collections.liquid
  • Changes don’t appear in the dropdown, even when editing existing option text

Community Responses:

Guleria provided code to modify the sort options loop in main-collection-product-grid.liquid (for Dawn theme), suggesting updates to the {%- for option in collection.sort_options -%} block.

PaulNewton clarified that simply adding HTML to the dropdown doesn’t create the underlying sort algorithm—apps are typically required to implement custom sorting functionality on Shopify storefronts.

Status: The discussion remains open with no confirmed working solution. The core issue is that custom metafield sorting requires backend logic beyond just UI modifications.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hi,

I want to add a new option value from the Sort By dropdown. Then field is a custom metafield in Products named: custom.product_class. The values of this are: Premium and Regular.

First step, I thought of adding the values first on the dropdown from en.default.schema.json.

And also here on main-list-collections.liquid. But still it won’t appear. I even tried editing the text of some existing options from the en.default.schema.json but it also wont appear.

Is there way to do this? If you have other ideas?

Thank you.

Hello @aih_kimg ,

Find this part of code, using DAWN it’s in sections → main-collection-product-grid.liquid

{%- for option in collection.sort_options -%}
                    
                  {%- endfor -%}

And update it with this one

{%- for option in collection.sort_options -%}
                    
{%- endfor -%}

Regards
Guleria

@aih_kimg adding arbitrary html doesn’t create a sort algorithm.

Generally apps are need to add a custom sort to a storefront.