Add a Message to the Product Pages by Using Product Tags Shopify -Easy – EcomExperts

Add a Message to the Shopify Product Pages by Using Product Tags - 2021 Easy Tutorial

You can add a message to product pages using tags on your Shopify store, all you have to do is input the right codes in the right places. 

This tutorial would help you figure out how to add a message to Shopify product pages using code. 

Add A Message To Product Pages

Step 1:  Make a duplicate of your live theme 

Go to the Online Store > Themes > next to the live version of your theme click on Actions > Duplicate


 Step 2: Paste the code to the  product-template.liquid

Now that we have the duplicate of our live theme we can start coding. Click on Actions > Edit Code

From the navigation to the left scroll down to the Sections directory and choose product-template.liquid.

Paste the following code where you want your message to be shown, for example above Add to cart button.


 {% for tag in product.tags %} 

 {% if tag contains 'newMessage:' %} 

             {{ tag | remove:'newMessage:'}} 

     {% endif %} 

 {% endfor %}     


Click on Save!


 Step 3: Add message to your products 

From your Shopify admin click on Products and find the product you want to add a message to. On the right side you will see one small box with  tags. type "newMessage: " and your message. So for example we will go with "newMessage: Only available for in store pickup" and add a tag. Click on Save.


 Step 4: Check if everything is working properly 

Go to the online store, find the product and give yourself a big pat on the back!


Leave a comment

About Andrew Durot

He is the co-founder of Ecom Experts, a Shopify focused development agency. 

Ecom Experts and Andrew's team have been focused on speed optimization - increasing the speed of over 300 stores in last year alone.

Speed Optimization is a repetitive & time-consuming task that most veteran Shopify experts try to avoid.

Andrew and his team has taken it upon themselves to maser the subject and become the largest speed optimization team on he Shopify platform even building out the only Shopify specific speedchecker tool!

Check Your Speed


Leave a comment