Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Custom Conditional Not working

Custom Conditional Not working

kemmieg
Shopify Partner
48 2 9

I have a theme that was purchased on CodeCanyon and I've added a small piece of code to the product template and I have it set to only show if the tag is "boots" or "shoes" but for some reason one of the products shows this item even when it doesn't have either of those tags. I've been searching to see if I could figure out why it's not working and I'm at a loss.

 

The product url is https://russellmoccasin.com/products/backcountry?variant=44534078865621 and the item that is showing is the Talkbox (that is also the class of the div). It shouldn't be showing at all.

 

Any help would be greatly appreciated.

 

Here is the piece of code I put in the template file

 

{% for tag in product.tags %}
              {% if tag == 'boots' or 'shoes' %}
            <div class="talkbox">
              <a href="https://russellmoccasin.com/pages/find-your-russell-size-return-shipping-program">
                <img class="sizing_info" src="https://cdn.shopify.com/s/files/1/0665/3214/7413/files/russell_size_yellow_606d9e43-302c-444d-a465-254e5abaef35.svg?v=1706879492">
              </a>
            </div>
            {% endif %}
              {% endfor %}

 

Replies 0 (0)