Hall dear community, I am trying to make an overlay in the product images to show bullet points at the bottom of the image.
My question is. Is it possible to target the single images with an IF formula? So far I have tried that. Without success it is displayed on each image.
{%- if product.images[0] -%}
Sterling Silver
{% endif %}
Maybe someone knows a solution. The problem is that it is always displayed on every image and I don’t know how to tell shopify show it for example only on image 1 or image 2 or image 1 and 3 …
@Vince311 , check the code like this in your theme and update it as per your requirement
{% assign images = product.media | where: 'media_type', 'image' %}
{% if images.first %}
{{- images.first | image_url: width: 300 | image_tag }}
{% endif %}
:
Hey this seems dont work the Text is now under every product image. I need to say its only under first or under second or under third.
@Vince311 , could you please share some screenshots or small recordings? so I can check and guide you based on that.
i figure it out, i dont see the for tag in the product gallery liquid. I made it with index0 and than 1 or 2. This work for me fine.
Thanks a loot for your effort.