Hey, @wildpetals . Welcome to the Community! That’s great to see you’re attempting to make this customization on your own.
If you’ve ensured that you have selected the correct theme for the tutorial, as seen below, and your sold-out variants are still not being hidden after adding the provided block of code to the theme.js file, then the Shopify Theme department can certainly take a look at it for you.
To move forward with this we’ll need to authenticate your account and check your design time eligibility. While we’re not able to provide account-specific support via the Shopify Community at this time, we’d be happy to continue assisting you through live chat, email, or callback. Please visit the Shopify Help Center and log in to your account to create a support request.
You can try our Push Down & Hide Out of Stock app. Our app hides out-of-stock items automatically. The hidden items no longer are visible on your store, Collections, or Search Results. Also, if an item is back in stock, it is published automatically.
It has a quick and easy setup. You can find more details on our app page.
We have also a free plan, and if it is suitable for you, you can use it for free! If you have any questions, please don’t hesitate to reach out to us at support@merchbees.com