🎉   New theme alert!   Check out   ETHERYX
Skip to content

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

  1. Go to Settings → Metafields in your Shopify admin.
  2. Click Products to open the product metafield settings.
  3. Select Add definition
  4. Save your new metafield definition.

Step ② - Fill metafield in products

  1. Go to Products in your Shopify admin.
  2. Select a product to edit.
  3. Scroll down to the Metafields section.
  4. Enter a value for the new metafield.
  5. Click Save

Step ③ - Display metafield on the product page

  1. Go to Online Store → Themes in your Shopify admin.
  2. Click Customize, then open a product template.
  3. Select (+)Add blockText.
  4. In the top-right corner of the sidebar, select Insert dynamic source to connect the metafield.

Video tutorial available

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

  1. Go to Online Store → Themes in your Shopify admin.
  2. Click Customize, then open a product template.
  3. Select (+)Add blockCustom 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>