How to turn off price in sold out products

Topic summary

A user seeks to hide prices on sold-out products in their Shopify store, referencing an attached screenshot showing out-of-stock items still displaying prices.

Proposed Solutions:

  • CSS approach: Add .price.price--sold-out { display: none !important; } to hide prices using a CSS class selector

  • Liquid template approach: Modify the theme.liquid file by adding conditional logic above the </body> tag that checks product availability before displaying prices

Both solutions involve code modifications to the Shopify theme. The CSS method targets a specific class, while the Liquid approach uses {% if product.available %} conditional statements to control price visibility based on stock status.

Note: Some text in the original posts appears reversed or encoded, but the core technical solutions remain clear. The discussion remains open with no confirmation of which solution was implemented or successful.

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

Hello ,

Is there any way to hide the price in all the sold out products , So that the price is not displayed next to them.

YOU CAN VIEW THE SOLD OUT PRODUCTS IN

FEEDING-> HIGH CHAIRS & BOOSTERS

SITE URL :: https://nxxdacuumxpfw971-71493648693.shopifypreview.com

Hi @Anonymous

You can try to use this code and check

.price.price--sold-out dl { display: none!important; }
1 Like

Hey @Anonymous

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag

{% if product.available %}

{% else %}

{% endif %}

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed