Shopify themes, liquid, logos, and UX
Hi everyone,
I would love to add metafield (name of material) under title in product grid (yellow underline):
And this is the code (product-card.liquid). now instead of my metafield there is blank space.
I would appreciate any help!
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?
Check out my blog for some awesome Shopify, SEO and Social Media Marketing content.
To hire me, visit my Upwork profile
Thanks for answering. Yes, I created it from an app, but I added it to product section too.
Where you able to resolve this?
@julian71 @TWBF @JohnFromJotting 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!
This works but without the first 'product' so just {{ card_product.metafields.name.material }}.
Good luck
I can confirm that @Shamu450 and @holidays code works.
1. Create a product metafield
2. Fill out the field for your desired product pages
3. include the following code in your theme's version of the file snippet 'card-product.liquid'
{{ card_product.metafields.name.material }}
I was having trouble displaying product metafields on non-product pages and this was the solution I was looking for.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025