Shopify themes, liquid, logos, and UX
Hello, I made a custom code in my product page and this is the link: https://www.offertissimo.it/products/offerta-limitata-smartwatch-effettua-e-rispondi-alle-chiamate-c...
This is my custom code:
<div style="margin-bottom: 0px;">
<img src="https://cdn.shopify.com/s/files/1/0730/8204/4765/files/34_99_1_-min.jpg?v=1683043327" width="340" />
</div>
This is the image:
But this image be shown in all my products description. How I can insert a code that could be shown this image in only my relative product and not all the products?
Thank you, kind regards
Solved! Go to the solution
This is an accepted solution.
To display the custom image only on specific product pages, you can use Shopify's conditional logic in your Liquid code. Here's an example of how you can modify your code to achieve this:
{% if product.handle == 'offerta-limitata-smartwatch-effettua-e-rispondi-alle-chiamate-c' %}
<div style="margin-bottom: 0px;">
<img src="https://cdn.shopify.com/s/files/1/0730/8204/4765/files/34_99_1_-min.jpg?v=1683043327" width="340" />
</div>
{% endif %}
This is an accepted solution.
To display the custom image only on specific product pages, you can use Shopify's conditional logic in your Liquid code. Here's an example of how you can modify your code to achieve this:
{% if product.handle == 'offerta-limitata-smartwatch-effettua-e-rispondi-alle-chiamate-c' %}
<div style="margin-bottom: 0px;">
<img src="https://cdn.shopify.com/s/files/1/0730/8204/4765/files/34_99_1_-min.jpg?v=1683043327" width="340" />
</div>
{% endif %}
Hello, sorry but when i add this code the image be disappear... do you know why?
Hello, could i use this code to hide the price only for this product?
Thank you and kind regards
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025