Metafields & Metaobjects

Shopify Metafield Not Showing? Here’s How to Debug It

By CartStack Team4 min read

A Shopify metafield not showing is one of the most common Liquid problems developers hit. The field exists in the admin, the value is filled in, yet the storefront prints nothing. This checklist walks through the chain in the order that finds the bug fastest. In most cases, a Shopify metafield not showing traces back to one of the causes below.

Cover graphic for debugging a Shopify metafield that is not showing
A metafield that looks empty is usually a chain with one broken link.

Start with the type, not the value

Before you touch Liquid, open the metafield definition and confirm its type. A single line text field, a rich text field and a metaobject reference field all render differently. If you guess the type wrong, the rest of your debugging wastes time on the wrong fix.

{{ product.metafields.custom.fabric.type }}

Print the type first. Then match it against the table in metafields in Liquid before you write the display code.

Check the namespace and key spelling

Namespace and key are case sensitive, and a typo here is the single most common cause of a Shopify metafield not showing. The default namespace for merchant-created fields is custom, but apps often use their own namespace.

{% for field in product.metafields.custom %}
  {{ field[0] }}: {{ field[1] }}
{% endfor %}

This loop prints every key under the custom namespace on that product. So you can confirm the exact key name instead of guessing it from the admin screen.

Confirm the product actually has a value

A definition does not guarantee a value. Each product needs its own entry filled in, and a blank field returns nothing. Check the specific product you are testing, not just the definition page.

{% if product.metafields.custom.fabric.value == blank %}
  no value on this product
{% endif %}

Why a Shopify Metafield Is Not Showing: the Missing .value Bug

Printing the metafield without .value returns the metafield object, not the content. In many cases that object prints as an empty string, which looks identical to a missing value. Always add .value after the key.

{{ product.metafields.custom.fabric.value }}

Metaobject references need an extra unwrap

If the field is a metaobject reference, .value returns the referenced entry, not text. You then need a second step to reach the actual content, and skipping it is why a reference field looks empty even with a value.

{% assign guide = product.metafields.custom.size_guide.value %}
{{ guide.title.value }}

Read metafields vs metaobjects if you are not sure which structure you are working with.

Confirm you are testing the right template

A template mismatch is an overlooked reason a Shopify metafield not showing keeps confusing developers who already fixed the Liquid code. Theme editor previews can point at a duplicate template or an unpublished theme. Also, some sections render through the section rendering endpoint rather than the main template, so a fix in one file may not appear where you are looking. Confirm the live theme and the exact template file before you assume the code is wrong.

A Copy-Paste Snippet for a Shopify Metafield Not Showing

When none of the fixes above solve a Shopify metafield not showing, dump every value at once. When nothing above finds it, dump every metafield on the resource at once. Place this snippet temporarily in the template and remove it once you are done.

<pre>
{% for ns in product.metafields %}
  {% for field in ns[1] %}
    {{ ns[0] }}.{{ field[0] }}: {{ field[1] }}
  {% endfor %}
{% endfor %}
</pre>

This prints every namespace, key and value on the product in one block, so you can compare it against what your template actually requests. For the full type reference, see the Shopify custom data documentation.

FAQ about a Shopify metafield not showing

Why does my metafield print as an empty object? You are missing .value on the reference.

Can a metafield be empty on some products and not others? Yes. Each product needs its own value, even if they share a definition.

Does clearing the theme cache fix it? Rarely. Most cases trace back to a spelling, type or missing value issue rather than caching.