I have folowed this process: 1) Set up color check boxes in the sidebar filter. 2) Set up metafield: create a new single-line text metafield for products. I used text.. Type in all the color names separately (one line for each color) this will see you time, when you define the colors in your products. 3) In navigation. in 2.0 you will find a new field named “Filters” underneath the menus. Add a filter. Now you can add the metafield in your filter. Select the one you just created. 4) go to the products where you want to add the color. scroll down. you will find the metafield you just created. find the right color in the dropdown list you just created. save product. Couple of things not worked: 1) I have separate collections so do I need to create separate meta fields going in each collection and in each variant? 2) I have tried adding into products’ color meta field but that color is not displayed through meta fields in the side bar filter ? Am I doing something wrong ?
Topic summary
Main issue: Product color metafields are not appearing in the sidebar filter in a Shopify OS 2.0 store.
What was done:
- Created a product single-line text metafield for colors and populated color values per product.
- Added the metafield as a filter under Navigation > Filters and set up color checkboxes in the sidebar.
Problems encountered:
- Colors do not display in the sidebar filter despite being set on products.
- Open question: whether separate metafields are needed for each collection or for variants.
Proposed solutions:
- Edit theme Liquid to render the color filter output. A code snippet was provided that loops through filters, checks for the “Color” label, and outputs color swatches based on filter values. (Code snippet is central to the suggestion.)
- Consider using a third-party filter app (e.g., Ultimate Search and Filter) that supports color metafields as swatch filters.
Key terms:
- Metafield: custom data field attached to products.
- Liquid: Shopify’s templating language used to control theme rendering.
Status:
- No confirmed resolution. The need for per-collection or variant-specific metafields remains unanswered.
Did you try to edit the liquid code to display product color metafield correctly?
Maybe you can try this for color metafield
{% for filter in filters %}
{% if filter.label == ‘Color’ %}
{% for value in filter.values %}
{% endfor %}
{% endif %}
{% endfor %}
Or using some filter app, just need to create color metafield, add it to the app and use it as swatch filter. https://apps.shopify.com/ultimate-search-and-filter-1