Skip to main content
Back to Glossary (M)
Glossary · M

Metafields.

Metafields are custom data fields in Shopify that let merchants add information to products, variants, collections, customers or orders that the standard model does not provide, such as material, care instructions, origin or a size chart.

Illustration of "Metafields": Custom product details as structured fields Metafields · DarjeelingFieldTypeValueSteeping timeNumber3 Min.TemperatureNumber80 °COriginTextIndia

Metafields — Explained in Detail

A Shopify product has fixed fields: title, description, price, variants, images, vendor, product type, tags. Many ranges need more. A wine merchant wants to show grape variety, vintage and serving temperature, a furniture maker dimensions and type of wood, a fashion store material and fit. Instead of writing this into the description, you create metafields. Each metafield has a name and a type and applies to a particular kind of object.

Types determine what can be entered: text, number with unit, date, true/false, colour, file, link, reference to another product or collection, or lists of these. Because the values are structured, they can be filtered, sorted and maintained in several languages. For recurring content that bundles several fields, such as a size chart or a designer profile, there are metaobjects: custom data types that products reference through a metafield.

Metafields are displayed in the theme through dynamic sources in the theme editor, without code, or specifically through Liquid. In a headless store they come through the Storefront API if exposed to the storefront. Apps often store their data in metafields too; review apps, for instance, store a product's average rating, which the theme then uses for stars and structured data.

For findability, metafields are an underrated lever. Structured details such as material, brand or origin can feed product schema, filters and category texts, and product feeds for the Google Merchant Center become more complete. The prerequisite is a clear structure before filling them: which fields, which type, who maintains them. Otherwise you end up with a jumble of half-filled fields.

Planning metafields properly

It pays to draw up a table before creating anything: which detail, for which object, which type, mandatory or optional, in which languages, where it is displayed. Fields nobody will maintain are better not created at all. And create metafields as definitions, not just free values, so they appear in the admin with input help and are available in the theme editor.

Data structure and product pages are part of every store project with us, see Shopify agency Switzerland.

Example from practice

For Racher, in the earlier theme version, we used metafields to store manually maintained SEO titles and descriptions that took priority over the automatically generated ones. The review stars in the product schema came from the metafields of the store's review app.

A constructed example to add: a tea shop creates the metafields steeping time (number, minutes), water temperature (number, degrees) and origin (text). The product page shows them as a preparation card, and the category filter lets customers search by origin.

In-depth on the blog

Shopify-Produktseite aufbauen

Frequently Asked Questions About Metafields

For details Shopify's standard model does not provide, such as material, care instructions, dimensions, origin or size charts. They can be maintained in a structured way, displayed in the theme, filtered and fed into structured data.

A metafield is a single extra field on a product, collection or other object. A metaobject is a custom data type with several fields, such as a designer profile, which products reference through a metafield.

Often not. Modern themes can include metafields in the theme editor through dynamic sources. Liquid code is needed for custom layouts, calculations or when the theme does not offer the spot.

Ready for Your Project?

Apply this knowledge to your website — DLM Digital will help you.