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.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024