metafield label

I want to focus on the problem of metafields, first of all we should develop blocks that allow us to easily trace back to metafields, not through code that is increasingly heavy and complicated.

Then I would like to pay attention to the fact that it is not possible to show the label of metafields which is useful information in stores where the products are many and all different.

for those who have this problem like me I leave a code below that practically hides the metafield if it has no content.

<div id="product-metafield">

{% if product.metafields.custom.codice_prodotto %}

<span class="titolo">Codice prodotto:</span> <br>

<span>{{ product.metafields.custom.codice_prodotto }}</span>

{% endif %}


Please authenticate to join the conversation.


In Review


πŸ’‘ Feature Request


28 days ago


Atelier Milazzo

Subscribe to post

Get notified by email when there are changes.