How to remove the price on products that have sold out, Brooklyn theme

Hi there,

Could I get some help on how to remove the price on products that have sold out. I still want the products to appear on the page. I managed to add the “Sold out” after the product title but have been unsuccessful hiding the price if sold out.

Thank you,

Melanie

1 Like

Hello there.

  1. Go to Online Store->Theme->Edit code
  2. Asset->/timber.scss.liquid->paste below code at the bottom of the file.
.is-sold-out .grid-product__price-wrap {
display: none;
}

@Moosha

Please add the following code at the bottom of your assets/theme.scss.liquid file.

.is-sold-out .grid-product__price-wrap {
display: none;
}

Hope this works.

Thanks!

Thanks but I still want to keep the Sold out text, only remove the price

1 Like

Hello There,

Please share your store URL and password.
So that I will check and let you know the exact solution here.

URL https://melanie-valentine.myshopify.com

1 Like

Hello there.

In this the structure has to be changed because the text and price are in the same tag.

@Moosha

Please remove the old given code and add this new code instead.

.is-sold-out .grid-product__price-wrap { visibility: hidden; }
.is-sold-out .grid-product__price-wrap .grid-product__price, .is-sold-out .grid-product__price-wrap .long-dash {
    visibility: visible;
}

Hope this works.

Thanks!

thank you! do you know how I could change it to just “Sold” instead of “sold out”?