Boost your sales with Candy Rack

Candy Rack is officially recognized as a Built for Shopify app.
The only upsell app you'll need to maximaze performance of your Shopify store. Make 2025 your best sales year with Candy Rack.
Try for free

Tomas Janu

|

July 11, 2025

How to hide sold-out products and out-of-stock variants on Shopify

One of the essential things to run a successful online business is managing inventory. You need to forecast to make sure your most popular products are always in stock. But what about those which are sold less often and sometimes become out of stock?

How to hide sold-out products and out-of-stock variants on Shopify
How to hide sold-out products and out-of-stock variants on Shopify

One of the essential things to run a successful online business is managing inventory. You need to forecast to make sure your most popular products are always in stock. But what about those which are sold less often and sometimes become out of stock?

You definitely don't want to display sold-out products at the top of your collections, and neither drive any campaign traffic to their product pages.

An example of the sold out product.
An example of the sold out product.

The best way to handle sold-out inventory is to either hide it entirely or at least push it to the bottom of your collections. This guide will explore the first approach and learn how to hide products and their variants.

Option #1: Use a third-party app

Several third-party apps can help you with managing your store inventory. Our recommendation is an app called Nada: Sort & Hide Out-of-Stock.

Hiding sold out products using Nada app.
Hiding sold out products using Nada app.

Nada: Sort & Hide Out-of-Stock automatically hides sold-out products by unpublishing them from the Online Store sales channel. But it also automatically puts them back online when they are available. On top of that, it creates redirects, so there are no 404 errors. So it essentially removes the disadvantages from option #2, #3, and #5.

The app starts at $4.99 per month, and you can take advantage of a 7-day free trial.

Other apps to try:

For more options, check out the list of the best Shopify apps for hiding sold-out products.

Option #2: Unpublish product from the sales channel(s)

Probably the easiest way to hide the product from your Shopify store is by unpublishing from a particular sales channel. In the case of an online store, the default channel name is Online Store (surprisingly).

Unpublishing product from the Online Store sales channel.
Unpublishing product from the Online Store sales channel.

To unpublish the product from the sales channel, follow these steps:

  • Go to your product catalog and open details of a particular product
  • In the top-right corner, click on Manage in the SALES CHANNELS AND APPS section
  • Uncheck the desired channel, click Done, and Save
  • And the product is hidden, and no one can purchase it anymore

Besides hiding the product from the storefront, it will also be hidden from a site search.

However, you need to keep in mind the disadvantages which are: 

  1. Returning 404 error on the product page (Google doesn't like that at all!). It can be resolved via custom redirects
  2. It can be time-consuming in the case of dozens of products that you need to unpublish and republish again. Product import & export can save a lot of time

Option #3: Set product status to draft

It is similar to option #1 with the difference that once the product is set to draft, it's not visible and is not purchasable at all channels. Disadvantages are the same.

Setting product in the draft status.
Setting product in the draft status.

To set the product status to draft, follow these steps:

  1. Go to your product catalog and open details of a particular product
  2. In the top-right corner, in the Status section, click on Active drop-down and change it to Draft
  3. Click on Save, and the product is hidden everywhere

Option #4: Set automatic collection rules

If you are using automatic collections, you can add a condition to display only products that are in stock. The significant advantages compared to the previous two methods are:

  • No 404 errors (product pages are still accessible through direct links)
  • No manual work, everything is automatic, and the product will become visible once it's available again
Setting inventory stock condition for collection.
Setting inventory stock condition for collection.

To set the inventory stock condition follow these steps:

  1. Go to your Shopify store admin > Products > Collections
  2. Select a particular collection, and in the section Conditions click on Add another condition. If you don't see Conditions section that means the collection is not automatic, but manual
  3. From the drop-down select Inventory stock + is greater than + 0
  4. Click on Save and that's all. The product will no longer be visible in your collection pages (i.e. yourstore.com/collections)

The disadvantage is that it doesn't work with manual collections, and it doesn't apply to site search.

Option #5: Create automatic rules in Shopify Flow

Shopify Flow is an automation app built by Shopify which allows you to create simple workflows using the IF, THEN, and OTHERWISE rules. It works similarly to Zapier or Make. Once you add the app to your store you can start building your own workflows, or you can browse the public collection which has over 160 shared flows. For hiding and republishing products, the flow is called "Hide and republish products based on inventory level".

The main advantage is the automation and customization. But hiding of the product happens without a redirect, so any visitor of the product page will get a 404 error.

Hiding and republishing sold out products with Shopify Flow.
Hiding and republishing sold out products with Shopify Flow.

Luckily, Shopify Flow is now available for all Shopify merchants including the ones using Shopify Basic plan.

Bonus: Hiding sold-out variants only

The challenge is how to hide only a particular variant on the product page – not a whole product. Unfortunately, all options above work only when the whole product is sold out (i.e., all its variants).

It doesn't work if you want to hide a particular variant from a selector on your product page. Shopify platform doesn't allow a product variant to be unpublished or set to draft.

An example of the sold out variants displayed on the Dawn theme.
An example of the sold out variants displayed on the Dawn theme.

Hiding sold-out variants on the Dawn theme

If you are using Dawn (or similar 2.0 theme), you are lucky because you can hide the sold-out variant using a bit of custom CSS.

  • Go to your store admin > Online store > Themes > Customize
  • Go to product detail page template and select the "Product information" block in the left template menu
  • Scroll down to Custom CSS and add following code:
.product-form__input .disabled + label {
  display: none;
}

The result should look like this.

Hidden sold out variants on the Dawn theme.
Hidden sold out variants on the Dawn theme.

Hiding sold-out variants on the Horizon theme

If you are using a modern theme like Horizon announced at the Editons Summer 2025, the custom CSS unfortunately won't work because the sold-out variants don't have a CSS class.

So you'll need to edit the liquid code of your theme which requires a bit of technical knowledge.

  • Go to your store admin > Online store > Themes > ... > Edit code
  • Find a file called "variant-main-picker.liquid"
  • Find the <label> element and insert condition {% if product_option_value.available %} above it
  • Find the closing </label> element and insert {% endif %} below it

Your code should look like this.

An example of the liquid code for hiding sold out variants in the Horizon theme.
An example of the liquid code for hiding sold out variants in the Horizon theme.

The condition will make sure that if the variant isn't available for sell, it won't be displayed on the product detail page.

If you are not able to adjust the custom CSS yourself or you are using a different theme, feel free to contact us, and our agency team will be happy to look into it.

Tomas Janu

Tom loves writing about upselling, conversion optimization, and e-commerce trends. He is one of our co-founders, and you can sometimes talk to him if you contact our support team. Make sure to follow him on LinkedIn for more Shopify-related tips and news.

Please note that we are an official Shopify partner and may earn referral commissions.

Try for freeCandy Rack preview

Latest articles

All articles

Boost your Shopify business with our apps

All our apps are designed to help you grow your Shopify business. Check them out and take advantage of the free trial period.

Boost my Shopify