How to let users sort a catalog by custom metafield values?

Topic summary

Goal: Enable catalog filtering and sorting by numerical custom metafields in a Shopify collection.

What was tried: Adding filters via Online Store > Navigation > Collection and search filters. Result: Filters appear as discrete options; cannot sort by metafields.

Key questions:

  • Can metafield filters be continuous (range slider) like the price filter? Answer: No, not natively; requires an app.
  • Can products be sorted by metafield values? Answer: No, Shopify does not support sorting by metafields.

Workarounds suggested:

  • Install third‑party filter/search apps to achieve both continuous/range filters and sorting by product or variant metafields. Cited options include “Product Filter & Search” apps and “Ultimate Search and Filter,” which claim support for metafield-based sorting and correct variant data display.

Outcome: No native Shopify solution for continuous metafield ranges or metafield-based sorting. The actionable path is to use a third‑party app.

Status: Unresolved natively; practical resolution via apps. Images were screenshots illustrating filter setup and the price range slider but are not essential to the final guidance.

Summarized with AI on February 14. AI used: gpt-5.

Hi all,

I have a collection which contains products with custom metafields.

Most of the metafields contain numerical datatypes. I want to let users sort and filter the catalog by these metafields.

However, I am not sure how to achieve this.

Link to catalog: https://www.viralboost.io/collections/accounts

Is there anyone that can help me out with this?

Hi @vboost ,

Please go to Online Store > Navigation > Collection and search filters > Add filters.

You can add filter here, it will display fine:

Thanks for your suggestion.
This is the outcome of your solution:

  1. Is it possible to change this filter to a continuous filter? Like the Price filter:

  1. This still won’t allow me to use these metafields to sort the products. Is there a solution to achieve that?

Thanks in advance!

Hi @vboost ,

1: This is not possible, Shopify only supports it filter like regular fields. If you want to edit like price, you can just install app for it.

2: This is not possible, Shopify does not support sort for Metafields.

=> The results shown are best for Metafields if you don’t want to install the app. If you want to satisfy conditions 1 and 2, you can refer to the app: https://apps.shopify.com/product-filter-search or https://apps.shopify.com/product-filter-and-search

Hope it is clear to you.

1 Like

Hello,

You cant use the Shopify standard filter and search to sort by metafields. This app https://apps.shopify.com/ultimate-search-and-filter-1 will definitely help you sort your products by product metafields and variant metafields. Also it helps show the correct variant information when sorting.