Main product image is duplicated in the other featured images (Narrative Theme)

Solved
Highlighted
Excursionist
25 0 6

Hello,

I am using the Narrative Theme and I would like to know if there is a way to avoid the main product image to also be featured in the other images of the product (down, after the description)? When I look at the demo version of the Narrative Theme, the main product image does not feature twice. So I don't know why it's doing it by default for me.

Thank you!

Website: https://gymelectronics.com/products/the-relaxing-gun%E2%84%A2

Password: aleang

1 Like
Highlighted
Excursionist
25 6 11

This is an accepted solution.

Hello @Thevyvy 

1. Go to Online Store->Theme->Edit code
2. sections->/product-template.scss.liquid-> change this .

    <div class="product__submedia-list product__submedia-list--r{{ total_modulus }}{% if total_media == 1 %} product__submedia-list--single{% endif %}">

      {% for media in product.media %}

        {% unless variant_media_ids contains media.id and section.settings.hide_variant_media %}
          {% capture data_image %}
            data-parent-fit="cover"
          {% endcapture %}

          {% include 'product-preview-image' with media, featured_media: false, gallery_type: 'submedia', data_image: data_image %}

        {% endunless %}
      {% endfor %}
    </div>

By

<div class="product__submedia-list product__submedia-list--r{{ total_modulus }}{% if total_media == 1 %} product__submedia-list--single{% endif %}">
      {% for media in product.media %}
	    {% if media != featured_media %}
        {% unless variant_media_ids contains media.id and section.settings.hide_variant_media %}
          {% capture data_image %}
            data-parent-fit="cover"
          {% endcapture %}

          {% include 'product-preview-image' with media, featured_media: false, gallery_type: 'submedia', data_image: data_image %}

        {% endunless %}
      {% endif %}
      {% endfor %}
    </div>

 

Hope this will work for you.


Thanks!

 

 

Belgacem Ben ltaif
Web consultant /Shopify Expert/ CTO Powerful Consulting
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
https://about.me/benltaif
2 Likes
Highlighted
Excursionist
25 0 6

It worked, thanks!

0 Likes
Highlighted
Excursionist
25 6 11

hello @Thevyvy 

If helpful then please Like and Accept Solution

thx

Belgacem Ben ltaif
Web consultant /Shopify Expert/ CTO Powerful Consulting
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
https://about.me/benltaif
1 Like