Appearance
Metafields
Combine your OpenThinking theme with Metafields to create dynamic content. Metafields are a powerful tool to add custom data to your products, collections, and pages. By using Metafields, you can display different content depending on the currently selected product, collection, or page.
Step ① - Add a new metafield definition
- Go to
Settings → Metafields
in your Shopify admin. - Click Products to open the product metafield settings.
- Select Add definition
- Save your new metafield definition.
Step ② - Fill metafield in products
- Go to
Products
in your Shopify admin. - Select a product to edit.
- Scroll down to the Metafields section.
- Enter a value for the new metafield.
- Click Save
Step ③ - Display metafield on the product page
- Go to
Online Store → Themes
in your Shopify admin. - Click Customize, then open a product template.
- Select (+) → Add block → Text.
- In the top-right corner of the sidebar, select Insert dynamic source to connect the metafield.
TIP
Use the Bulk Editor to quickly update metafields for multiple products at once.
Unsupported Metafields
IMPORTANT
Not all metafield types can be displayed using standard blocks. For example, to display an image metafield, you'll need to use the Custom Liquid block and call the metafield using Liquid code.
Step ① - Add a custom liquid block
- Go to
Online Store → Themes
in your Shopify admin. - Click Customize, then open a product template.
- Select (+) → Add block → Custom Liquid.
Step ② - Get Metafield values with liquid
Use Liquid code to retrieve and display metafield data.
Generate a text version of the metafield data:
liquid
{{ product.metafields.openthinking.instructions_wash | metafield_text }}
html
This is a single line of text.
Generate an HTML element for the metafield
liquid
{{ product.metafields.openthinking.instructions_wash | metafield_tag }}
html
<span class="metafield-single_line_text_field">
This is a single line of text.
</span>