All things Shopify and commerce
I am currently using the Blockshop theme and have several different FAQ pages for various types of products. I am utilizing page.faq.json and metafields with collapsible rows to design these pages. Some FAQ pages have 10 questions and others only have 5; how can I get the empty metafields to not show up on the FAQ pages?
Attached is example of the problem I'm running into:
Hello @Novader ,
Find it code and make it conditional.
like this:
{% if product.metafields.custom.your_metafield != blank %}
<p>Your metafield value: {{ product.metafields.custom.your_metafield }}</p>
{% endif %}
Thanks
Where should this code be placed within the page's coding?
No need to place this code.
This code was just for demonstration.
You need to manually find the existing code in the theme files and wrap each metafield with if condition as I did in the example.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025