Hiding the "sold Out" badge on certain collections and /or products - Empire theme

Topic summary

A user seeks to hide the “Sold Out” badge on specific products or collections in their Shopify store using the Empire theme.

Proposed Solutions:

  • Liquid template modification: Edit product-card.liquid or product-grid-item.liquid to conditionally exclude the badge using {% unless product.handle == 'your-product-handle' %} or {% unless collection.handle == 'hidden-collection-handle' %} wrappers around the existing badge code.

  • CSS targeting: Add custom CSS to hide the badge by targeting specific collection or product handles:

    • .collection-your-collection-handle .badge--sold-out { display: none !important; }
    • .product-your-product-handle .badge--sold-out { display: none !important; }

Current Status:

The user tested one solution but reports it hides the “Coming Soon” badge instead of “Sold Out,” indicating the issue remains unresolved. The user shared their store URL for further troubleshooting. Multiple responders offered to provide hands-on assistance if given collaborator access.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Hi,

Please help - I’ve tried all sorts of things and I’m not achieving what I want.

I’d like to hide the “sold out” badge for certain collection and/or products (as in the picture - the yellow arrow is pointing to it)

Please help!!!

2 Likes

To hide the “Sold Out” badge for specific products or collections:

Go to Theme > Edit Code, find the badge code (usually in product-card.liquid), and wrap it like this:

{% unless product.handle == 'your-product-handle' %}
  {% if product.available == false %}
    <span class="badge sold-out">Sold Out</span>
  {% endif %}
{% endunless %}

Replace ‘your-product-handle’ with the actual product handle. Save and you’re done.

hello @ME4295

Hide “Sold Out” badge for specific collections:–
Step 1: Identify the file showing the badge
Typically, this badge is rendered in:

product-card.liquid
or sometimes:

product-grid-item.liquid

Go to Online Store …> Themes …> Edit code and search for the file that renders the product grid.

Step 2: Find the “Sold Out” badge code
Look for something like:

{% if product.available == false %}
  Sold Out

{% endif %}

Step 3: Add a collection condition
Wrap it with a condition to exclude specific collections. Example:

{% unless collection.handle == 'hidden-collection-handle' %}
  {% if product.available == false %}
    Sold Out

  {% endif %}
{% endunless %}

Replace ‘hidden-collection-handle’ with your collection’s handle (from the URL slug).

if its works please accept my solution

thanks

Hello @ME4295
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

https://hadeco.co.za/search?filter.v.availability=0&q=lilium

Hello there,

Thank you for this - but it hides the "coming soon badge and not the “sold out” badge.

Is there anything else that can be tried?

@ME4295 ,

To hide the “Sold Out” badge for specific collections or products, you can add custom CSS targeting those products or collections by their handles or IDs.

Example CSS to hide sold out badge on a specific collection page:

.collection-your-collection-handle .badge--sold-out {
  display: none !important;
}

Or to hide on specific products by their product handles in the product grid:

.product-your-product-handle .badge--sold-out {
  display: none !important;
}

You need to replace your-collection-handle or your-product-handle with the actual handle from your store URLs.

If you’re still having this issue, I’ll fix it for you. Please share your store URL and collaborator request code, I’ll do it quickly for free.

If it resolves your issue, please mark my answer as a solution. Are you comfortable doing it on your own, or need a detailed guide? Or if you want to hire an expert to do it for you, I’m here. Please DM.