Use your Online Store 2.0-compatible theme in combination with the Metafields admin to generate dynamic content and connect with storefront features.
For this guide, we will use metafields and dynamic content to include an ISBN (International Standard Book Number) on product pages.
Add a new metafield definition
Add a new metafield definition
- In your Shopify admin, open Settings
- Open Metafields
- Open Products or Variants
- Select Add definition
Each metafield definition needs a Name, Namespace and key, and Description for internal reference.
Click (+) Select content type to choose:
- Color
- Date and time
- File
- JSON
- Measurement
- Number
- Rating
- Reference
- Text
- True or false
- URL
For this example setup, we need a Number content type to provide an ISBN for relevant products.
Save, then go to your Products admin.
Fill the metafield in the Products admin
In the Products admin, open a product to complete the metafield. Scroll down to Metafields, then enter the ISBN number for the new metafield.
Save, then go to the Themes portion of the Online Store.
Connect to theme feature(s)
Open the theme editor (Customize), then open a product template.
Create additional templates with the theme editor
Metafields are connected to blocks or sections on pages. For this example, we are connecting the dynamic content for the ISBN metafield with a Text page block.
Select (+) Add block, then Text. Click to open the block.
In the top-right corner of the sidebar, select Insert dynamic source.
Select ISBN, then Insert.
For this example, we have also added some introductory text and moved the Text block position below the product Title.