How to hide sold out products by coding

New Member
6 0 0

Hey there,

I want to hide sold out products automatically in my shop. I've done some research found 2 ways i want the coding way to do this.

I found this solution but it didn't work for me 

Go to the product-grid-item.liquid under 'Snippets' in the theme editor.

Add the following code on top of the first <div> tag.

{% if product.available == true %}

and close the if below the last </div> tag. That is at the end of the file.

{% endif %}

Any advice?

Shopify Staff
Shopify Staff
606 35 93

Hi, @Shulebags 

Elle here from Shopify. 

I've moved your post from our Technical board over to our Design board where you should receive a better response.


Elle | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog