Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey there Shopify community!
I am trying to edit the Featured-Product section in Refresh Theme. I want it to feature the third image in the product page, not the primary image by default. I don't wish to change the main product image, because that will change the look of my store and collection pages. I only want to show the tertiary image on the Featured Product Section.
Can anyone help?
{% assign third_image = featured_product.images[2] %}
{% if third_image %}
<img src="{{ third_image | img_url: 'master' }}" alt="{{ featured_product.title }}" />
{% else %}
<img src="{{ featured_product.image | img_url: 'master' }}" alt="{{ featured_product.title }}" />
{% endif %}
This code checks if the product has a third image. If it does, it will display that image; otherwise, it will fall back to the primary image.
Thanks... where do I add this snippet? Every time I try to add it, the page breaks 😕
@NomtechSolution thanks... but where do I add this snippet? Every time I try to add it, the page breaks 😕
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025