Shopify themes, liquid, logos, and UX
Hello,
I have added the code below to my shopify product.liquid and added tag " hide" on my product but I'm still seeing pricing on all my products. I was hoping with this condition, I can hid pricing on some of my collections. I have tire a true condition such as 1 == 1 and the condition works but condition with tag is not working. I'm not sure what I'm missing in setting proper tag
{% if product.tags contains "Hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
I appreciate help
Solved! Go to the solution
This is an accepted solution.
Hi @nmaryami
In Shopify 2.0 themes, the product card snippet assigned some values to these options.
Kindly share your theme name to check it further.
If you're using Shopify Dawn theme, you can use the below code.
{% if card_product.tags contains "Hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
Working snap:
Let us know if this code solve your issue.
This is an accepted solution.
Hi @nmaryami
You're using the wrong line of codes. Try instead below code.
{% if card_product.tags contains "hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
This is an accepted solution.
Kindly try my code once. You're using the wrong code.
{% if card_product.tags contains "hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
This is an accepted solution.
Hi @nmaryami
In Shopify 2.0 themes, the product card snippet assigned some values to these options.
Kindly share your theme name to check it further.
If you're using Shopify Dawn theme, you can use the below code.
{% if card_product.tags contains "Hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
Working snap:
Let us know if this code solve your issue.
Hello,
Thank you for your quick response. I'm using Crave Theme
Thanks
I'm using the same code but it doesn't work
Hi @nmaryami
On card-product.liquid, line number 197. I added the code shared above, and it's working at my end.
Hello @Sheesh_b
I'm not sure then what is wrong on my end. something about how to add tags, maybe. But I tried different tag names and it has the same result
Thanks
Hi @nmaryami
Tags are case-sensitive.
If you added Hide tag, then use it as it is in the code, else use hide if it is 'hide'.
This is an accepted solution.
Hi @nmaryami
You're using the wrong line of codes. Try instead below code.
{% if card_product.tags contains "hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
This is an accepted solution.
Kindly try my code once. You're using the wrong code.
{% if card_product.tags contains "hide" %}
<div class="ProductItem__PriceList Heading">
Price on demand only
</div>
{% else %}
<div class="ProductItem__PriceList Heading">
{% render 'price', product: card_product, price_class: '' %}
</div>
{% endif %}
Hi ! how are you
I used this code
And then in every product I dont want to see the price I put "hide" but the prices still appear... do you know whats going on?
This worked perfectly on the Shopify free them Refresh. Thank you.
is it possible to hide the price just in some products?
I used this code and all the prices in my website desappeared
price {
display: none;
}
But I want the price in some of them. Thanks
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025