Metafields and metaobjects
How themes read product data from metafields, and how to create the definitions.
Updated
A metafield is an extra field on a product that holds data Shopify does not have built in, such as a fit note or a skin type. Our themes read specific product metafields and show them in blocks and cards. Which metafields your theme reads is listed in your theme's guides.
Create a definition
- In the Shopify admin, open Settings > Custom data > Products.
- Add a definition with the namespace, key and type your theme's guide gives. For example
custom.fit_note, a single line text. - Fill the field in on each product.
A block that finds no value hides itself on the storefront. In the editor it may show a short note.
Reviews
Themes can read the standard review metafields reviews.rating and reviews.rating_count. Reviews apps write them. They show as stars on cards and in the rating block if your theme has them.
Related
Still stuck? Get theme support