Adding content to specific product page

Highlighted
Tourist
14 0 0

Hello,

 

I am adding a video below the product images for a specific product. (I dont want the video in the product description area). I have added this code where I want the video in product-template.liquid :

<iframe width="560" height="315" src="my video url" controls='0"' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>

 

The clear problem is that the video shows up on every product and I would like it to show up on 1 specific product only.(948171276332)

There should be some code that I can add that says "add to this product only ". 

 

Please let me know what I can add to make this work.

 

Thank you in advance! 

0 Likes
Shopify Partner
45 13 9

Hi,

You can use this code .

 

{% if product.id == 948171276332 %}
  <iframe width="560" height="315" src="my video url" controls='0"' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
{% endif %}
If helpful then please Like and Accept Solution.
Email: mijan.karim@yahoo.com
Skype: mijan.karim
0 Likes