Shopify sold out guide
Hide sold-out products from Shopify search results
What you’ll need
A duplicate of your theme to test on
How to get this: A duplicate of your theme to test on
- Online Store › Themes › … on your theme › Duplicate.
- Make the change on the copy, preview it, and publish only when it works.
The theme editor (to add a Custom Liquid block; no code editing)
How to get this: The theme editor
- Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
- Add section or Add block › Custom Liquid, paste the code, then Save.
Shopify’s free GraphiQL app (with read_products, write_products (for the collections step) access)
How to get this: Shopify’s free GraphiQL app
- Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
- Then open it any time from Apps › Shopify GraphiQL App in your admin.
Hide them from collections too
Steps
- Install Search & Discovery from the Shopify App Store (free, made by Shopify).
- Open Apps › Search & Discovery › Settings.
- Under Out of stock products choose Hide, Show last or Show, then Save.
Good to know
- A product counts as out of stock only when all its variants are unavailable.
- If your theme or a search app sends its own settings, it can override this one.
- Collections ignore this setting; use the inventory condition for them.