Metabuf Faqs

What is the metafields object?

The metafields object is an internal Shopify feature that provides users an extra space to store the additional data used in custom apps and themes.

The metafields object consists of four main components: namespace, key, value, and description (optional). Namespaces are used to group different metafields, keys are unique identifiers to reference the information stored in the metafields, and values will contain the the data itself.

The metafields object is used for the backend data management only and doesn’t affect neither the storefront nor the functionality of the website by default.

You can learn more about the metafields object from the official Shopify documentation.

How to display metafields at the product page?

1. Add metafields to a Shopify product

Navigate to a product details page in the Shopify Admin. Near the top of the page, "More actions > Metabuf - Edit".

The resulting page will show all global metafields available for the product in view.

Click "Create Metafield"(or edit existing metafields), and Enter the following:

  • Type = HTML
  • Key = test
  • Namespace = global
  • Value = Example

Click the "Save" button to save the changes

2. Go to your Themes code in your Shopify Admin.

You can locate your themes code going in your Shopify Admin > Online Store > Themes > Actions > Edit Code

3. Click on the "product.liquid" file located within the Templates folder.

“product.liquid” file contains the code for the page that displays your products.

4. Add code to display your Metafield

Now we will add just one line of code to display this new Metafields we created in the "Add metafields" section.

Metafield: {{ product.metafields['global']['test'] }}

4. Save and go check current product in your online store.

You can learn more about the product.liquid template from the official Shopify documentation.


Watch the video below if you’re not in the mood for reading

How to display metafields at the collection page?

1. Add metafields to a Shopify collection

Navigate to a collection details page in the Shopify Admin (Product > Collections)
Near the top of the page, "More actions > Metabuf - Edit".

The resulting page will show all global metafields available for the collection in view.

Click "Create Metafield"(or edit existing metafields), and Enter the following:

  • Type = HTML
  • Key = test
  • Namespace = global
  • Value = Example

Click the "Save" button to save the changes

2. Go to your Themes code in your Shopify Admin.

You can locate your themes code going in your Shopify Admin > Online Store > Themes > Actions > Edit Code

3. Click on the "collection.liquid" file located within the Templates folder.

“collection.liquid” file contains the code for the page that displays your collections.

4. Add code to display your Metafield

Now we will add just one line of code to display this new Metafields we created in the "Add metafields" section.

Metafield: {{ collection.metafields['global']['test'] }}

4. Save and go check current collection in your online store.

You can learn more about the collection.liquid template from the official Shopify documentation.


Watch the video below if you’re not in the mood for reading

How to display metafields at the general page(online store page)?

1. Add metafields to a general page

Go to Shopify Admin > Online Store > Pages.
Select an existing page or create a new one.
Near the top of the page, "More actions > Metabuf - Edit".

The resulting page will show all global metafields available for the general page in view.

Click "Create Metafield"(or edit existing metafields), and Enter the following:

  • Type = HTML
  • Key = test
  • Namespace = global
  • Value = Example

Click the "Save" button to save the changes

2. Go to your Themes code in your Shopify Admin.

You can locate your themes code going in your Shopify Admin > Online Store > Themes > Actions > Edit Code

3. Click on the "page.liquid" file located within the Templates folder.

“page.liquid” file contains the code for the page that displays your general pages.

4. Add code to display your Metafield

Now we will add just one line of code to display this new Metafields we created in the "Add metafields" section.

Metafield: {{ page.metafields['global']['test'] }}

4. Save and go check current general page in your online store.

You can learn more about the page.liquid template from the official Shopify documentation.


Watch the video below if you’re not in the mood for reading

How to display metafields at the blog post(online store article)?

1. Add metafields to a blog post

Go to Shopify Admin > Online Store > Blog posts.
Select an existing blog post or create a new one.
Near the top of the page, "More actions > Metabuf - Edit".

The resulting page will show all global metafields available for the blog post in view.

Click "Create Metafield"(or edit existing metafields), and Enter the following:

  • Type = HTML
  • Key = test
  • Namespace = global
  • Value = Example

Click the "Save" button to save the changes

2. Go to your Themes code in your Shopify Admin.

You can locate your themes code going in your Shopify Admin > Online Store > Themes > Actions > Edit Code

3. Click on the "article.liquid" file located within the Templates folder.

“article.liquid” file contains the code for the page that displays your blog posts.

4. Add code to display your Metafield

Now we will add just one line of code to display this new Metafields we created in the "Add metafields" section.

Metafield: {{ article.metafields['global']['test'] }}

4. Save and go check current blog post in your online store.

You can learn more about the article.liquid template from the official Shopify documentation.


Watch the video below if you’re not in the mood for reading

How to display metafields at the online store blog?

1. Add metafields to a blog

Go to Shopify Admin > Online Store > Blog posts -> Manage blogs.
Select an existing blog or create a new one.
Near the top of the page, "More actions > Metabuf - Edit".

The resulting page will show all global metafields available for the blog in view.

Click "Create Metafield"(or edit existing metafields), and Enter the following:

  • Type = HTML
  • Key = test
  • Namespace = global
  • Value = Example

Click the "Save" button to save the changes

2. Go to your Themes code in your Shopify Admin.

You can locate your themes code going in your Shopify Admin > Online Store > Themes > Actions > Edit Code

3. Click on the "blog.liquid" file located within the Templates folder.

“blog.liquid” file contains the code for the page that displays your blogs.

4. Add code to display your Metafield

Now we will add just one line of code to display this new Metafields we created in the "Add metafields" section.

Metafield: {{ blog.metafields['global']['test'] }}

4. Save and go check current blog in your online store.

You can learn more about the blog.liquid template from the official Shopify documentation.


Watch the video below if you’re not in the mood for reading

Will I lose my metafields if I uninstall the app?

Metafields remain with your store even if you uninstall this app.

Will the I lose my metafields if I change the theme?

Changing the theme won’t remove the metafields, but this may affect the your shop’s storefront.

Some themes feature the functionality to display the metafields “out of the box”, however, most likely your metafields won’t be displayed at the product page as they used to be.

We recommend you to consult with your developer before switching to another theme to make sure this process won’t affect your store’s design or functionality.