What Metafields Are and Why They Matter
Metafields are custom data fields that let you store and display additional information about any Shopify resource — products, variants, collections, pages, orders, customers, and locations. Before native metafields, stores used third-party apps or hacked information into product descriptions. Since Shopify expanded metafield support, you can define structured data directly in the admin and display it in your theme with no app required.
Creating Metafield Definitions
Go to Settings → Custom data in your Shopify admin. Select the resource type (Products, Collections, Variants, etc.). Click “Add definition”. Give it a name (e.g. “Ingredients”), a namespace and key (e.g. custom.ingredients), and a type (rich text, single line text, measurement, file, product reference, etc.).
The namespace separates your custom fields from app fields. Use “custom” for fields you create. App-installed fields use the app name as namespace (e.g. “judgeme”, “klaviyo”). This prevents conflicts when multiple apps use the same field names.
Common Metafield Use Cases
- Product specifications: material, dimensions, weight, certifications
- Ingredients list for food and beauty products
- Compatibility: “Works with [Product]” — using a product reference list
- FAQs per product stored as structured data
- Complementary products cross-sell list
- Care instructions or usage guide text
- Custom badges: “New Arrival”, “Staff Pick”, “Bestseller”
- Colour/size guide files per product
Filling Metafields at Scale
For stores with large catalogues, filling metafields one-by-one in the admin is impractical. Use Shopify’s bulk import via a CSV with metafield columns, or use the Metafields Guru app which provides a spreadsheet-like interface for bulk editing. The Shopify API also supports metafield writes, enabling programmatic population from external data sources.
Displaying Metafields in Your Theme
In your theme code, access a product metafield with the Liquid syntax: {{ product.metafields.custom.ingredients }}. For rich text metafields, use: {{ product.metafields.custom.ingredients | metafield_tag }} which renders the formatted text. For file metafields (images or PDFs), use: {{ product.metafields.custom.size_guide.value | image_url | image_tag }}.
Alternatively, use the Theme Editor’s content connector — most modern Shopify themes support connecting theme sections to metafield sources without code editing. Look for the “Connect dynamic source” icon (a circular icon) in the Theme Editor when clicking on text blocks.
Metaobjects: Structured Data Beyond Individual Resources
Metaobjects are a newer Shopify feature that let you create reusable structured data templates. Example: a “Brand” metaobject with fields for name, logo, description, and country of origin. You define the template once, create instances (Nike, Adidas, etc.), then reference them from product metafields. This avoids duplicating the same data across hundreds of products.
SEO Benefits of Metafields
Metafields displayed on product pages add unique, structured content that helps Google understand what a product does and who it is for. Ingredient lists, technical specifications, and compatibility information are exactly the kind of content that differentiates your product page from competitors. Combined with structured data markup, metafields can power rich snippets that display product details directly in search results.
Shopify Experts · OneOnic
Ready to Grow Your Shopify Store?
Our Shopify experts at OneOnic have helped hundreds of store owners scale faster. Let us build, optimise, and grow your store.
