Sense Theme (15.4.0) How to hide price of sold out items?

Topic summary

A user is trying to hide prices only for sold-out items or collections in the Sense theme, rather than hiding all prices store-wide.

Current Issue:

  • They’ve successfully hidden all prices but need a more targeted solution
  • Attempted using conditional Liquid code that checks product availability:
    {% if product.available %}
      {{ product.price | money }}
    {% else %}
      Sold Out
    {% endif %}
    
  • This approach appears to only work when adding a subscription line item below the normal price
  • The solution isn’t achieving the desired result, suggesting something may be missing

Goal:
Selectively hide prices for specific sold-out collections/items without affecting available products throughout the store. They explicitly state they are NOT looking to add additional conditions to their current code.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hello! I have learned how to hide ALL prices, but this is not what I need. I would like to hide the prices of specific collections or items on the Sense theme. The prices I want hidden are specifically sold-out collections or items, but I have not figured out how to do this without it affecting the entire store

I am NOT looking to add an additional condition for this.
{% if product.available %}
{{ product.price | money }}
{% else %}
Sold Out
{% endif %}

the above only appears to work by adding a subsection line item below the normal price. Unless I am missing something, this does not seem to achieve what I need.

1 Like

Per Guidelines search first

Search first https://community.shopify.com/search?q=sense+hide+sold+out

Use alternate templates to have per resource theme settings
https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-template

So you have logic you don’t want to modify.
How do you expect someone else to suggest anything with that constraint.

Hi @dsfp

Hide price only for sold-out items

In your product/collection card code, wrap the price like this:

{% unless product.available %}
  <style>
    #ProductInfo-{{ product.id }} .price { display: none !important; }
  </style>
{% endunless %}

Hide price only for specific collections

Inside collection loops:

{% if collection.handle == "your-collection-handle" %}
  <style>
    #ProductInfo-{{ product.id }} .price { display: none !important; }
  </style>
{% endif %}

If you want both (sold-out AND specific collections), just combine them.

Best regards,
Devcoder :laptop:

Hi @dsfp
You can add this code to Custom CSS in Theme settings to hide the price of a sold-out item.

.price.price--sold-out .price__container,
.card__content .price.price--sold-out {
    display: none !important;
}

Best regards,
Dan from Ryviu: Product Reviews App