How to add metafield under title in product-card.liquid

julian71
New Member
2 0 0

Hi everyone,

I would love to add metafield (name of material) under title in product grid (yellow underline):

julian71_1-1634935473671.png

And this is the code (product-card.liquid). now instead of my metafield there is blank space.

julian71_2-1634935542052.png

 I would appreciate any help!

 

Replies 4 (4)
Bluish
Shopify Partner
651 94 115

Hi @julian71 

first you are missing ">" in "<a" which is why </a> is red.

Second I assume you created the metafield from shopify metafield creator? Did you add the materials in the shopify product section?

 

Bluish_0-1634939883737.png

 

Check out my blog for some awesome Shopify, SEO and Social Media Marketing content.


To hire me, visit my Upwork profile

julian71
New Member
2 0 0

Thanks for answering. Yes, I created it from an app, but I added it to product section too.

TWBF
Excursionist
13 0 2

Where you able to resolve this? 

Shamu450
New Member
2 0 0

@julian71 @TWBF @Bluish  Not sure if you figured it out yet, but I was able to display a metafield on the collections page and featured collections block product card by using product_card_product instead of product, so the metafield in the post it would be

 

 

 

{{ product_card_product.metafields.name.material }}

 

 

Hope this helps!