Metafields

I might be misunderstanding, but I’m assuming your current theme/Liquid looks something like this:


Fringe: {{ product.metafields.some_namespace.fringe }}

Length: {{ product.metafields.some_namespace.length }}

The metafield name is “hardcoded” and will always be displayed even if there’s no metafield value as you said. The simplest way to make the name depend on the value’s existence would be wrapping them in conditionals:

{% if product.metafields.some_namespace.fringe == blank %}
  

Fringe: {{ product.metafields.some_namespace.fringe }}

{% endif %}

{% if product.metafields.some_namespace.length == blank %}
  

Length: {{ product.metafields.some_namespace.length }}

{% end %}

Note: you might not need the == blank part.