add a code to a spe...
 
Notifications
Clear all

add a code to a specific product

3 Posts
2 Users
1 Reactions
181 Views
(@danielle12)
Active Member
Joined: 4 years ago
Posts: 19
Topic starter  

Hi,

Iam using plak and I have an HTML code that i want to apply to one product only and not the entire products.

Is there a way i can do that ???

Thanks in advance


   
Quote
PJAX
 PJAX
(@pjforum)
Eminent Member
Joined: 4 years ago
Posts: 33
 

Hello @danielle12

PJ here from Plaktheme Support.

In order to assign the html code to only one product, please follow these steps

  • From your Shopify admin click Online Store -> Themes -> Actions -> Edit Code
  • Open the 2 files prod-template1.liquid and prod-template2.liquid.
  • Then paste this code where ever you want to display this text/code:
{% for tag in product.tags %}

{% if tag contains 'YOUR-TAG-HERE' %}

//YOUR Code Here

{% endif %}

{% endfor %}

For Example: If you want it to display under the product title, the tag would be 'in-stock'

Note: You must add the tag on a certain product for it to display.

Should you have any other concerns, please do not hesitate to let me know!

Best Regards,

PJ

PJ | Plak theme support

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
danielle12 reacted
ReplyQuote
(@danielle12)
Active Member
Joined: 4 years ago
Posts: 19
Topic starter  

It worked like a charm, you're the best as always, thank you so much PJ and plak team 🙂


   
ReplyQuote
Share:

Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.

Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple