A problem about access global metaobject

Topic summary

Problem Identified:
A user needed to create and access a global metaobject in Shopify to store and display information site-wide, but couldn’t determine the correct access method using {{ shop.metaobjects['xxxx'] }}.

Initial Suggestions:

  • Assign the metaobject to a metafield attached to products, collections, or pages
  • Use third-party apps like Metafields Guru for managing shop-level metafields

Core Challenge:
All standard metafields require attachment to specific resources (products, variants, collections), but the user needed a truly global configuration independent of any particular resource.

Solution Found:

  1. Navigate to Settings > Custom data
  2. Add a Metaobject definition at the bottom (e.g., ‘Global Meta Data’)
  3. Go to Content > Metaobjects to add entries and define fields
  4. Access in Liquid using: shop.metaobjects.[type].values

This approach enables storing global variables as fields within a custom metaobject definition, accessible throughout the store without resource-specific attachment.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

I want to create a global metaobject, store some information in this object, and display the information on website.

But I don’t know how to access this object :disappointed_face:

{{ shop.metaobjects[‘xxxx’] }} does not work …

After creation, You can assign it to a metafield like other option
Create a metafield and choose metaobject there
and you can add data to it under content
Thanks!

Thank you! But it seems I can only and metafield to a product, collection, page, etc. I want to add global object which does not belong to a product or collection. It seems there is a proper global object which I can add my metafield.

1 Like

Thanks you very much!! The problem is I don’t know how to define a global metafield. It seems all metafields should be attached to a product, variants, collection, etc. Is it possible to define a metafield independently ? Because what I need is a global config which is not belong to a product or variant.

Now I can only define a metafield here:

1 Like

hey wzc! were you ever able to figure this one out? global metaobjects would be huge!

To define global metafields, Shopify does not have default option for this. We can use free app for metafields like Metafields Guru and after you can use shop metafields to define global object.
Thanks!

Hi @collin-f4d
To define global metafields, Shopify does not have default option for this. We can use free app for metafields like Metafields Guru and after you can use shop metafields to define global object.
Thanks!

Finally figured it out! You can create a global metaobject by going into Settings > Custom data then add a Metaobject definition at the bottom. I created one named ‘Global Meta Data’ where I’ll store all my global variables as fields. To define them go to Content > Metaobjects where you’ll ‘Add entry’ and define your fields. After you define them you can access them in liquid like this:

shop.metaobjects.[type].values

This will list all your defined fields. Type is defined where you created the Metaobject in Custom data.

1 Like