Metafields

Metafields help you to customize the functionality and appearance of your Shopify store by letting you save specialized information that isn't usually captured in the Shopify admin. You can use metafields for internal tracking, or to display specialized information on your online store in a variety of ways. For example, a candle seller might want to display a burn time for candles on their product pages, whereas a grocery store might want to display a product expiration date for canned goods. Other examples of specialized information include:

  • part numbers
  • color swatches
  • launch dates
  • related products
  • blog post summaries
  • files for download
  • lists of ingredients

You can add metafields to your products, collections, customers, orders, and other parts of your store, directly from your Shopify admin.

Learn more about using metafields.

Category metafields are product attributes that map to a specific product category. Category metafields help you add the right information to your products to make them more discoverable by visitors on your site, on marketplaces, and on search engines.

Category metafields have default entries based on the standard product category. For example, if you add the product category Apparel & Accessories > Clothing > Shirts & Tops, then you can add category metafields for clothing size, neckline, sleeve length type, length type, age group, material, and color. Category metafields use metaobjects and metaobject entries. Learn more about category metafields.

If you have an Online Store 2.0 theme, then you can connect most metafields to your theme by using the theme editor. If you're using vintage themes, or if you want to add metafield types that your theme doesn't support, then you can edit your theme code.

Setting up new metafields involves the following tasks:

  1. Adding metafield definitions to add fields for your specialized information to pages in your Shopify admin
  2. Adding metafield values to parts of your store, such as products or variants
  3. Optional: Connecting metafields to your theme to display specialized information on your online store

You can also migrate existing metafields to a definition. Adding definitions for sets of metafields enforces validation rules to ensure that your metafield values are consistent and reliable. If your metafield values don't match the validation rules for your definition, then you can fix invalid metafield values after migration.

In this section

Ready to start selling with Shopify?Try it free