Hiding an active product from collections/all.

I have used meta fields to hide a product from search, but it is still showing up as part of collections/all. I tried to remove it through the liquid, but that did not work. I’m wondering how I can keep an active product from showing up on the product page (collections/all) that shows everything. Could a meta field work?

If the collection is an automated collection try adjusting it’s conditions to exclude a specific product by a characteristic is.

Typically by adding a tag to the product. (metafields currently not support in automated collections)

If the metafield to hide a product form search is often changes consider setting up an automation in shopify-flow to tag a product based on that metafield. Or us shopify-flow to control which products are added/removed from a manual collection.

Thank you for the advice. I did add a tag and I added a line to the collection liquid to exclude it, but it did not work. I’m guessing I have not correctly placed it in the liquid or there is an error with how it is written?

Where you able to resolve this RiddleOil? We’re having the same issue.

No, I still haven’t been able to figure it out. Sorry!

We added some liquid code:

{% unless product.tags contains 'DYO' %} // if product.tags does not contain 'DYO'
    {% if product.id != skip_product.id %}
    {% endif %}
{% endunless %}

also, ChatGPT is pretty knowledgeable on liquid - so don’t forget that resource is available.