Shopify Metafields: Custom Fields Guide
Metafields (also called custom fields) let you store and display additional information in your Shopify store. If Shopify's standard fields don't capture everything you need—like product specifications, care instructions, or custom attributes—metafields fill the gap. This guide covers how to create and use them.
What Are Metafields?
Metafields are custom data fields you can add to various Shopify resources:
- Products: Specifications, materials, care instructions
- Variants: Per-variant details like color codes or sizing charts
- Collections: Additional descriptions, featured banners
- Customers: Preferences, account notes
- Orders: Special instructions, internal notes
- Pages and blogs: Custom content sections
Creating Metafield Definitions
Step 1: Access Custom Data
- Go to Settings in your Shopify admin
- Click Custom data (or Metafields in older versions)
- Select the resource type (Products, Collections, etc.)
Step 2: Add a Definition
- Click Add definition
- Enter a name (what you'll see in admin)
- Choose the data type
- Add a description (optional but helpful)
- Set validation rules if needed
- Save
Metafield Data Types
Text
- Single line text: Short text like brand names, materials
- Multi-line text: Longer content like care instructions
- Rich text: Formatted content with headings, lists, links
Numbers
- Integer: Whole numbers
- Decimal: Numbers with decimal places
- Rating: Star ratings (1-5 scale)
Measurements
- Dimension: Length, width, height
- Weight: Product weights
- Volume: Capacity measurements
References
- Product: Link to another product
- Variant: Link to a specific variant
- Page: Link to a store page
- File: PDFs, images, documents
Other Types
- URL: Web addresses
- Color: Color picker with hex values
- Date: Date values
- True or false: Boolean toggles
- JSON: Structured data
Adding Metafield Values
Once definitions are created, add values to individual items:
- Edit a product (or collection, customer, etc.)
- Scroll to the Metafields section
- Enter values for your defined fields
- Save
Displaying Metafields on Your Store
Theme Customizer (Recommended)
Modern themes (Online Store 2.0) support metafields natively:
- Open the theme customizer
- Navigate to the template (product page, collection page, etc.)
- Add a section or block that supports dynamic content
- Click Connect dynamic source
- Select your metafield
Liquid Code
For advanced customization, access metafields in Liquid templates:
Common Metafield Use Cases
Product Specifications
- Materials and fabric content
- Dimensions and measurements
- Technical specifications
- Country of origin
Additional Content
- Care instructions
- Warranty information
- Size guides (linked files)
- Ingredient lists
Collection Enhancements
Add metafields to collections for:
- Featured banners or promotional images
- Extended descriptions
- Category-specific content
Metafield Best Practices
- Use clear naming: Names should be immediately understandable
- Add descriptions: Help staff understand what to enter
- Choose the right type: Use specific types (numbers, dates) rather than text when possible
- Set validation: Add min/max values or required fields where appropriate
- Plan before creating: Document your metafield structure before building
Managing Metafields at Scale
- Bulk editor: Edit metafields across multiple products
- CSV import: Import metafield values via spreadsheet
- Apps: Third-party apps provide advanced metafield management
- API: Developers can manage metafields programmatically
Conclusion
Metafields extend Shopify's flexibility, letting you store and display exactly the information your business needs. Start with a few key definitions for your most important custom data, then expand as you identify more use cases. Well-organized metafields improve both your admin experience and customer-facing content.
Related Resources
Explore More Guides
Information may be outdated or incorrect, and we recommend verifying any information before relying on it.