Skip to main content
All CollectionsKehio EditorAdvanced settings and optimization
Understanding and using metafields with Kehio Editor
Understanding and using metafields with Kehio Editor
Updated over a week ago

In this article, we'll cover how to use metafields with Kehio Editor to create dynamic content in your creations.

What is a metafield?

A metafield is a custom field that allows you to store additional information specific to your products, pages, collections and more in your Shopify store. Metafields are particularly useful for adding features that may vary from one product to another.

Why use metafields with Kehio Editor?

Creating dynamic content

Using metafields with Kehio Editor allows you to create dynamic, personalized content for your products without having to create a new creation for each product. For example, instead of creating a separate page for each product variation, you can use metafields to adapt this information directly within the same creation.

Example: For a tea brand

Let's say you sell several types of tea, and you want to display the composition and brewing time, which vary from product to product, in the first tab of your product accordion. Rather than creating a separate accordion for each product, you can define metafields for composition and brewing time. Then, in your Kehio Editor creation, you insert these metafields directly into your composition and brewing time tab, and your content will be dynamically displayed for each product.

Here's what your accordion could display for each product in the tab dedicated to this information:

Product 1: Black Tea

  • Tea composition: black tea (Sri Lanka, India, China) (95%), aromas (wild berries 2%, bergamot 2%), cornflower petals.

  • brewing time: 2'30 - 3 min at 167°.

Product 2: Green Tea

  • Tea composition: green tea (China) (90%), peach (peach, rice flour) (5%), orange blossom (3%), peach flavor.

  • brewing time: 4 min at 167°.

By using metafields, you can easily manage your product variables without having to create new creations, which saves you time, makes your store more flexible and customizable, and makes it easier to manage your designs.

📖 For more details and examples of how to use meta fields, see the Shopify documentation.


1 - Setting up a product metafield

Step 1: From your Shopify administrator page , go to Settings > Custom Data . Under metafields , select Product .

Step 2: Next, click on "Add definition".

Step 3: Fill in the name, Type and key, then choose the content type (in this example, we'll choose a text type to integrate the content of the tea brand mentioned above). The Description field is optional.

Click on "Save" when you're done.

2- Add the value to the metafield

Once you've created the product metafield, it will be added to your products settings. Next, you'll need to fill in the information in the created metafield in order to use it. This step must be completed for each product where you need to use the meta field.


Step 1: Go to the Shopify Admin page > Products and select the product to which you want to add more information via the meta fields.


Step 2: Scroll to the Metafields section on the product settings page.

Step 3: Enter the value in the field. Don't forget to click on "Save" when you're done.

Integrating the metafield in your creation

Step 1: Go back to the Shopify Admin page > Custom Data > Metafields > Product and find the metafield you'd like to display on your page.

Then copy the "Name and key" line .

Step 2: Go to the Kehio Editor dashboard, select the creation where you want to integrate your metafield and choose the content that will integrate this dynamic source.

Note: In our case, we've selected the text item to add the "Composition" meta field in our example, but you have the option of setting up all our items with meta fields.

Step 3: Paste the "Name and key" line you copied earlier.

Important: Please note that the code must be inserted as follows:

{{ product.metafields.Name and key }}.

{{ product.metafields. }}

In our example, we have {{ product.metafields.custom.composition }}

Conclusion

Metafields are powerful tools for creating dynamic, personalized content in your Shopify store. Not only can you use them for products, but you can also create metafields for blog pages, information pages or collections. With Kehio Editor, you can manage these metafields wherever creations can be integrated, offering greater flexibility and customization.

Here are the variables to use for each category:

  • Product : {{ product.metafields. }}

  • Page : {{ page.metafields.}}

  • Blog : {{ blog.metafields. }}

  • Collection : {{ collection.metafields.}}

By using meta fields, you can dramatically improve the management and presentation of your content, making your store more dynamic and appealing to your customers.

If you need any further help, please don't hesitate to contact us by e-mail or live chat .

Did this answer your question?