Add custom data fields
Custom data fields, called metafields, store extra information on a product that the product form doesn't have, for example a care guide or the material. You create the definition once, then fill in the value on each product.
The value doesn't show in your store by itself. Your theme has to read the field.
Create a definition for products
- Go to Settings › Custom data.
- In the Metafield definitions section, choose Products.
- Click Add definition.
- Enter the Name, for example Care guide. The code right below the field fills in from the name, for example custom.care_guide.
- Under Type, choose a type, for example Multi-line text.
- In the Options section, turn on Storefront access if you want the theme to be able to read the value.
- Click Save.
You add fields for variants, collections, pages, posts and the other parts in the Metafield definitions list the same way.
Fill in the value for a product
- Go to Products and open a saved product.
- Find the Metafields section.
- If the field has no input yet, click the button with the field’s name, for example Care guide.
- Enter the value.
- Click Save.
The Metafields section is only on saved products. To make a field always show an input at the top of the section, click Pin on the definition page.
Show the value in your store
The value shows in your store only once your theme reads the field. Whoever edits your theme code needs the field’s code, for example custom.care_guide, and the definition needs Storefront access turned on.
For developers: Custom data and metaobjects shows how a theme reads the value and how to set values with the CLI.
Delete a definition
- Go to Settings › Custom data and choose Products.
- Open the definition you want to delete.
- Click More actions › Delete definition.
- Click Delete definition to confirm.
Thanks for your feedback.