Hi there -
I’ve used Custom Fields for the last year to add metafields to my site. Now I’m trying Shopify’s built in metafields, but I’m having trouble with the code. My product template is very customized, so I need to do this manually.
-
I added a new metafield called new_tab in Shopify.
-
I typed the word New! into that field on a product page.
-
Now I need to display the field… but I’m stuck. The below code isn’t working. What have I got wrong?
{% if product.metafields[“new_tab”] != blank %}
{{ product.metafields["new_tab"] }}
{% endif %}