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

  1. Go to Settings in your Shopify admin
  2. Click Custom data (or Metafields in older versions)
  3. Select the resource type (Products, Collections, etc.)

Step 2: Add a Definition

  1. Click Add definition
  2. Enter a name (what you'll see in admin)
  3. Choose the data type
  4. Add a description (optional but helpful)
  5. Set validation rules if needed
  6. 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:

  1. Edit a product (or collection, customer, etc.)
  2. Scroll to the Metafields section
  3. Enter values for your defined fields
  4. Save

Displaying Metafields on Your Store

Theme Customizer (Recommended)

Modern themes (Online Store 2.0) support metafields natively:

  1. Open the theme customizer
  2. Navigate to the template (product page, collection page, etc.)
  3. Add a section or block that supports dynamic content
  4. Click Connect dynamic source
  5. 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
Enhance Your Collections: AWSM Collections works alongside metafields to create dynamic, well-organized collections that showcase your products effectively.

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

Disclaimer: While we strive to provide accurate and up-to-date information, we cannot guarantee the correctness of all content.
Information may be outdated or incorrect, and we recommend verifying any information before relying on it.