Add the filter in Search & Discovery
To use multilingual tags as a filter, add a filter in Shopify’s official Search & Discovery app.
Prerequisite
Section titled “Prerequisite”Creating the metafield definition must be complete. In particular, storefront access must be enabled or the metafield won’t appear as a filter option.
- Open the Search & Discovery app (there is a link on the app’s home screen)
- Open “Filters”
- Choose “Add filter”
- Choose “Product metafield” as the filter source
- Set the namespace and key to
custom.multilang_tags - Save
The namespace and key are shown under “Setting up Search & Discovery” on the app’s home screen, so you can copy them from there. If you changed the storage location under Advanced, use that value instead.
How this differs from the built-in tag filter
Section titled “How this differs from the built-in tag filter”| Built-in tag filter | Multilingual tag metafield filter | |
|---|---|---|
| Language of filter values | Default language only | Translated into the languages published on your store |
This difference is the main reason to use this app.
Making tags clickable
Section titled “Making tags clickable”Once the filter exists, the “Link tags to filtered results” setting on the product page block becomes useful. With it enabled, clicking a tag navigates to a URL like:
/collections/all?filter.p.m.custom.multilang_tags=New%20arrivalSee Add the block to your product page for how to enable it.
If the metafield isn’t offered as a filter
Section titled “If the metafield isn’t offered as a filter”- The metafield definition isn’t exposed to the storefront (how to check)
- You just created the definition and it hasn’t propagated yet
- No product has any tags yet (run the migration)