Hello Shopify Friends,

In this Shopify blog, we will learn How to Show Custom Data on Product Page using Metafield in Shopify.

Metafields in Shopify allow you to add custom fields to your products, allowing you to store and display additional information beyond the default product attributes in Shopify. Metafields allow you to display specialized information differently within your Shopify online store.

Let us learn how you can show custom data to a product page using Metafield in Shopify.

Steps to Show Custom Data on Product Page using Metafield in Shopify:

Step 1: Go to your Shopify admin, and in Shopify admin, click on Settings.


Step 2: After that, click on Custom data and go to Products metafield.

Custom Data - Products

Step 3: Now click on Add definition.

Add Definition

Step 4: Fill up the name of metafield and select the type you want to add. Also, add a description if you want.

Metafield details

Step 5: After selecting the type of metafield, click on Storefronts to show that data in the online store, then Save it.


Step 6: Open any product on your admin, fill up the Metafields option, and Save it.


This is your namespace and key to show data on the product page.

Namespace and Key

Step 7: Click on the Online store, click Edit code, and search your main product page to add code.

Online Store - Edit Code

Step 8: Add the below code in your product page 

Step 9:  Now your output looks like the below screenshot

Frontend custom data


By following these steps, you can create and utilize metafields to store and display custom data for your products in Shopify.

Related Article – How To Add Products To Shopify?

Share this tutorial to display custom data on the product page using Metafield in Shopify. Stay updated with us for more articles.

Happy Reading!

Click to rate this post!
[Total: 3 Average: 5]