Shopify metafields let you attach structured custom data to products, variants, collections, customers, and pages — without hacking your theme or adding unnecessary apps. Since Shopify made metafields natively editable in the admin (no more third-party metafield editors required), they have become the standard way to store product-level information that does not fit standard fields.
Metafield Types Available in 2026
Shopify supports a wide range of metafield types. Choosing the right type ensures your data is stored cleanly and can be referenced correctly in Liquid or via the Storefront API.
| Type | Example Use | Liquid Output |
|---|---|---|
| Single-line text | Material composition (“90% cotton, 10% elastane”) | String |
| Multi-line text | Care instructions paragraph | String (use | newline_to_br) |
| Number (integer) | Thread count, weight in grams | Integer |
| Number (decimal) | Screen size, lens focal length | Float |
| Boolean (true/false) | Is this product sustainably sourced? | Boolean |
| Date | Warranty expiry, release date | Date object |
| File | Size guide PDF, spec sheet | URL string |
| Product / Collection reference | Related products cross-sell | Product object |
Creating Metafields in Shopify Admin
Go to Settings → Custom data → Products and click “Add definition.” Give it a name (e.g. “Care Instructions”), choose a namespace and key (e.g. custom.care_instructions), and select the type. Once saved, every product edit page will display this field in the Metafields section at the bottom. Fill it in per product — bulk editing is available via the product list view.
Displaying Metafields in Liquid
In your theme files, reference a metafield using {{ product.metafields.custom.care_instructions.value }}. For multi-line text, pipe through newline_to_br to render line breaks. For file types, you will get a URL — wrap it in an anchor tag. For product references, you can loop through the resulting product object just like any other Liquid product.
Online Store 2.0 themes (Dawn, Sense, Craft) support metafields natively in the theme editor via dynamic sources — no Liquid editing required. Click any text block in the editor, select “Connect dynamic source,” and pick your metafield.
Practical Use Cases
- Care instructions — multi-line text metafield displayed in a collapsible accordion on product pages
- Materials breakdown — single-line text listing exact composition, critical for fashion and compliance
- Custom badges — boolean “New Arrival” or “Bestseller” flags that your theme reads to display a badge overlay
- Warranty period — integer (number of months) displayed in the product description section
- Related products — product reference list metafield for a manual cross-sell widget, bypassing algorithmic recommendations
Metafield vs Variant: Which to Use?
| Scenario | Use Variant | Use Metafield |
|---|---|---|
| Customer selects it at purchase | Yes | No |
| Affects price or inventory | Yes | No |
| Informational only (no selection) | No | Yes |
| Same value across all variants | No | Yes (product-level) |
| Varies per variant (e.g. weight per size) | No | Yes (variant-level metafield) |
For stores with complex data requirements, a Shopify development specialist can build custom metafield-driven sections that keep your theme editor clean and your data structured for API consumption.
Frequently Asked Questions
Are metafields visible to customers by default?
No. Metafields are stored in the database but only appear to customers when your theme explicitly references them in Liquid or via the theme editor’s dynamic sources. Adding a metafield definition does not change anything visible on the storefront until you wire it up.
Can I bulk-edit metafields across many products?
Yes. From the Products list, select multiple products, click “Edit products,” and your metafield definitions will appear as columns. You can also import/export metafield values via CSV using the Shopify bulk import tool or apps like Matrixify.
What is the difference between metafields and metaobjects?
Metafields attach custom data to an existing resource (a product, page, or collection). Metaobjects are standalone custom data structures — think of them as custom database tables. Use metaobjects for things like “Team Members,” “Certifications,” or “Store Locations” that are not tied to a product but need to be displayed on the storefront.
Ready to Grow Your Shopify Store?
Our Shopify experts at OneOnic have helped hundreds of brands launch, optimise, and scale. Let’s talk about your project.
