All things Shopify and commerce
I've created a few Product Metafields for my product page. For example: Specs; Features; Care Instructions. -- But not all products have this info.
I'm surprised that this feature in Shopify doesn't have a checkbox where it says to not show if the field is empty. Since there is a problem when the shopper goes and tries to click on the Multi-field and it doesn't open because its empty.
Is there a way to solve this? Much thanks in advanced!
thank you for the reply. Would this be on the product liquid page? I've tried it in a few places but dont see anything changing.
Hi,
Hope this will help
- At Product Page File and Add Liquid Code Where You Want the Metafield to Show
Example:
if you want to show "Care Instructions" metafield only if it has content:
{% if product.metafields.custom.care_instructions != blank %}
<div class="care-instructions"> <h3>Care Instructions</h3> <p>{{ product.metafields.custom.care_instructions }}</p> </div> {% endif %}
- Replace custom and care_instructions with your actual metafield namespace & key.
- Repeat this for each of your fields
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025