Hide Price on Collection Page for Studio 2.0 Theme

I need to be able to hide the price on the collection pages for specific products. I have edited the code based on other recommendations in the forum, but it has hid all product prices not the specific ones.

There are two ways that the products are separated and can be identified:

Products that must have their price HIDDEN on the collections page are using the “in-store-only” page template and

are NOT in the “online” collection (linked below).

https://honeyfawn.com.au/collections/online

I have sorted the price showing on the product page, I just need the collection pages sorted!!

Please help!!

Hi @anitabanita11

Maybe I suggest you add “in-store-only” tag to products that you want to hide after that use liquid to check to hide price.

Thanks. But that won’t solve the code issue. I need to know what code to have to hide the pricing

This is the code I’m currently using

{% if collection.handle != 'online' %} .card__information .price { display: none !important; } {% endif %} #shopify-section-template--15790987542750__1646917325a197e0ca .card__information .price { display: block !important; }

Hi @anitabanita11

May I suggest to update code these steps:

  1. Go to each product that you would like to hide price after that add “in-store-only” tag

  1. Go to Store Online-> theme → edit code

  2. Snippets/card-product.liquid

  3. Add code below to top file

{%  assign hidePrice = false %}
{%  if  card_product.tags contains 'in-store-only' %}
  {%  assign hidePrice = true %}
{%  endif  %}
  1. Find
{% render 'price', product: card_product, price_class: '' %}

replace with code below

{%  unless hidePrice %} 
            {% render 'price', product: card_product, price_class: '' %}
{%  endunless %}

That worked - thank you so much!!!

Wondering if you might be able to help with this: https://community.shopify.com/c/shopify-design/fashionopolism-hide-price-on-collection-page/m-p/2564833#M674666