A Shopify metafield is a custom data field that you attach to a resource in your store (product, collection, customer, order, page) to store information that Shopify does not provide by default: dimensions, composition, size guide, badges. Since metafields and metaobjects coexist, they form the backbone of modern stores.
At Stellar Projects, this evolution has changed the way we design websites: we now build 100% natively manageable Shopify stores, without third-party custom field apps like Accentuate Custom Fields or page builders like Shogun. The result for our clients: more flexible, faster, easily scalable sites with a clear data structure that they can manage themselves without calling us for every change. This guide shows you how to do the same.
Table of Contents
What is a Shopify metafield?
A metafield is an additional field attached to an existing Shopify resource. Where a standard product page contains a title, description, price, and variants, metafields allow you to add any structured data: a dimension, a material, a date, an image, a reference to other content.
Each metafield is defined by a namespace, a key, and a data type. This structure ensures that the data is clean, reusable, and displayable anywhere in the theme. Metafields exist on products, variants, collections, customers, orders, pages, blog posts, and on the store itself. It is the basic building block of modern Shopify customization, complemented by metaobjects for standalone content.
Our approach: 100% native sites, without field apps
For years, adding custom fields to Shopify required third-party applications like Accentuate Custom Fields, and building rich pages required page builders like Shogun. Since metafields and metaobjects natively coexist, we have completely changed the way we design websites: these applications are no longer part of our stack.
Specifically, every store we deliver today is 100% natively manageable in Shopify. This choice has four direct consequences for our clients:
- Fewer app subscriptions: custom fields and page building no longer cost an extra cent per month.
- A faster site: fewer third-party scripts loaded on each page means as much gained on Core Web Vitals.
- Scalability without debt: data lives in Shopify, not in an app; changing themes or evolving the design doesn't break anything.
- Real autonomy: the data structure is clearly organized (pinned definitions, consistent naming), so our clients can modify their content themselves, without depending on us.
Creating a metafield step-by-step
No code is needed to create and populate a metafield. The complete process in the admin:
- Open Settings, then Custom data. This is the control center for all your metafields and metaobjects.
- Choose the resource (Products, Variants, Collections, Pages...) then click on "Add definition".
- Name the definition: a clear name (e.g., "Size Guide"), an automatically generated namespace and key, a description for your team.
- Select the data type (see the table below): this ensures the cleanliness of the entered data.
- Pin the definition to make it appear directly on the relevant pages, then fill in the field for each product.
Once the definition is created, the field appears at the bottom of each product page, ready to be filled by any team member, without risk of breaking anything.
Available data types
The type conditions both data entry and display. The main ones:
| Type | Typical use |
|---|---|
| Text (single line or multi-line) | Care instructions, regulatory notice |
| Rich text | Editorial block with bold, lists, and links |
| Number (integer or decimal) | Capacity, number of pieces |
| Dimension, weight, volume | Physical data with integrated unit |
| Date and date-time | Harvest date, re-release date, availability date |
| Color | Actual shade card of a color |
| File (image, video, PDF) | Technical sheet, certificate, instructions |
| URL | Controlled external link |
| True / false | Conditional badge (made in France, pre-order) |
| Reference (product, collection, page, metaobject) | Associated products, reference to structured content |
| JSON | Complex data for developers |
4 concrete use cases (including our stores)
The product metafields we most often deploy in production, starting with our own brand Cabania, where each product page is structured with metafields: bed dimensions, recommended age, materials. When the team adds a new model, they fill in these fields and the theme displays everything in the right place, automatically.
- Size Guide. A reference metafield points to the correct size chart depending on the category: only one content to maintain, displayed on dozens of pages.
- Composition and materials. Structured text or references, to display the exact composition without drowning it in the description.
- Product FAQ. Product-specific questions and answers, displayed in an accordion and usable as structured data.
- Conditional badges. A true/false field controls the display of a badge (made in France, eco-designed, pre-order) without touching the theme.
Displaying a metafield, with or without code
Since Online Store 2.0 themes, display is code-free: in the theme editor, each text, image, or list block can be connected to a "dynamic source," i.e., directly to your metafield. You insert a block, click on the connection icon, choose the field: done.
For advanced cases, displaying a metafield in Liquid takes one line. Example actually used in production to display a dimension:
{% if product.metafields.custom.dimensions != blank %}
<p class="product-dimensions">Dimensions : {{ product.metafields.custom.dimensions.value }}</p>
{% endif %}
The condition prevents displaying an empty label when the field is not filled: a simple reflex that distinguishes a clean integration from a makeshift one.
Metafield or metaobject?
The decision rule is simple: a metafield attaches data to an existing resource, a metaobject creates autonomous and reusable content. The dimension of a bed belongs to that product: metafield. A detailed material sheet, reused on thirty products: metaobject, referenced by a metafield. The two combine, and it is precisely this combination that has made third-party apps superfluous. We have dedicated a complete guide to Shopify metaobjects.
Limits and pitfalls to avoid
The error we find in 8 out of 10 audits: metafields created on the fly, often by old apps, without centralized definition. Result: anarchic namespaces, duplicates, catch-all text fields where a structured type was needed. The data exists, but no one knows who displays it or where anymore. Three rules prevent this:
- Always use definitions (Settings, Custom data), never wild fields created as you go.
- Choose the strictest possible type: a dimension is stored as a dimension type, not free text.
- Document the naming: a clear convention of namespaces makes the structure readable by the entire team, including those who will join in two years.
One last limitation to be aware of: metafields do not display themselves; they must be connected in the theme. This is the work we do during every Shopify store creation or redesign: a data architecture designed from the start, for a site you then administer without us. To go further on the fundamentals, our ultimate Shopify guide and our Shopify FAQ complete this page.