Metafield below product title on Dawn 4.0.0

marcelu
New Member
1 0 0

Hi,
I just installed the new v. 4.0.0 of the Dawn theme and I can't find a way to display a metafield below a product title on a collection page. With Dawn 2.x I could apply the code to product-card.liquid but something seems to have changed now. Thanks.

Replies 2 (2)
PantsMcGhee
Tourist
6 1 1

I have the same issue, I can get some text to output on card-product.liquid but not the metafield content.

<h4>text {{ product_card_product.metafields.my_fields.organic_certification }}</h4>

'text' outputs, but not the metafield content itself.

PantsMcGhee
Tourist
6 1 1

I got it to work. Luckily another app's code was right above mine and showed the right syntax. Use:

{{ card_product.metafields.my_fields.my_text }}

You can wrap your html around your own metafield, for example, below is my custom metafield and some tags;

<h4>text {{ product.metafields.my_fields.organic_certification }}</h4>