[Liquid] [OS 2.0] - collection.filters is different between Theme Editor and Storefront

Like the title, with this liquid code on collection page:

{%- for filter in collection.filters -%}
  {{ filter.label }}

{%- endfor -%}

On Theme Editor:

Availability

Price

Product type

Brand

But on the storefront, nothing output (I check the page source)

This seems really weird, can anybody guess the reason?

Hi @Leo_Huynh ,

Did you set it up in Navigation? https://i.imgur.com/h2qkQ9T.png .

Please check: https://help.shopify.com/en/manual/online-store/themes/os20/customize/filters

And it will display by product of the collection, so you need to make sure the product data is always correct.

Hope it helps!

If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.