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 by adding product care instructions.

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 to make it easier for you to add information to your store. For example, if you add the product category Apparel & Accessories > Clothing > Clothing Tops > Shirts, then you can add category metafields for size, neckline, sleeve length type, top length type, age group, fabric, target gender, clothing features, and color. Category metafields use metaobjects and metaobject entries for the values. For example, with the color category metafield, you can add green, red, and other color 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

Can’t find the answers you’re looking for? We’re here to help.