How to remove the "Sold Out" badge from only one specific collection?

I have a special collection template that I am using as a portfolio/archive. I want it to be viewable for visitors, but I don’t want the “Sold Out” tag to be on the images.

Is there a way to do this?

TIA

Collection: https://rowsomeleather.com/collections/select-portfolio

1 Like

Hi - not sure how much a programmer you are but you can do that quickly by going to the collection template and adding a condition like this:

{% if collection.title contains "your collection" %}

{%endif%}

Note: This will remove all badges (if you have others as I didn’t check)

Thanks for the reply!

I copied this code and updated my collection name. I tried to add it into both the custom css on the template, and the json collection code file. Neither will accept this.

Where is it meant to be applied?

Hi @RowsomeLeather

Check this one. This only shows on this specific collection section.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

div#shopify-section-template--17263469658264__product-grid .card__badge.bottom.left {
    display: none;
}

And Save.

Result:

One way is to use “Custom liquid” section/block.

Or, you can also duplicate your collection template and use this template copy only for this particular collection, then you should be able to use “Custom CSS” and paste only what’s inside .. there.

Neither “Custom CSS” nor json templates support liquid.

This worked perfectly! Thank you so much.

One quick question - say I wanted to apply this code to another collection, where did you find the identifying number for the collection?

Its by the section id can you share the link?