Skip to content

Shopify Dude Fix

Why Is a Shopify Shop Metafield Blank in Liquid?

A Shopify shop metafield exists in admin but returns blank in Liquid? Check the owner, namespace and key, value access, and storefront permissions.

Quick answer: A shop metafield usually renders blank because the code references the wrong owner, namespace, key, typed value, or access path. Confirm the metafield definition under Settings → Custom data → Shop, then test the exact Liquid reference before adding formatting or fallback logic.

The real symptom

  • The value is populated in Shopify admin.
  • {{ shop.metafields.custom.key }} outputs nothing.
  • A product metafield pattern works, but the shop-level version does not.
  • A Storefront API or headless request cannot see the same metafield.

Likely causes

  • The metafield definition belongs to Product, Collection, or another owner instead of Shop.
  • The theme uses the field label rather than the exact namespace and key.
  • The metafield is a typed value and needs .value or a type-aware render path.
  • The Storefront API path needs storefront access enabled on the metafield definition.
  • The value exists in another store, theme, or environment.

Exact admin path

  1. Go to Settings → Custom data.
  2. Open Shop.
  3. Open the metafield definition and copy the exact namespace and key.
  4. Confirm the value is saved for the shop.
  5. Enable storefront access only when the value must be read through Storefront API or a headless surface.
  6. Test the exact output in a plain Custom Liquid block.

Simple checks

  • Use {{ shop.metafields.custom.your_key | json }} to see whether Liquid can see the object.
  • If the object appears but the value is blank, test .value.
  • If the object is missing, check owner type, namespace, key, and store context.

Useful code or DevTools check

{{ shop.metafields.custom.mto_shirt_form_data.value }}
{{ shop.metafields.custom.mto_shirt_form_data | json }}

Do not do this

Do not rewrite the data model until you have confirmed the metafield owner. A shop metafield and a product metafield can have the same label but live on completely different objects.

Sources