What's your biggest current challenge? Have your say in Community Polls along the right column.

Hiding an active product from collections/all.

Hiding an active product from collections/all.

RiddleOil3331
Visitor
3 0 0

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?

Replies 5 (5)

PaulNewton
Shopify Partner
7450 657 1565

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.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


RiddleOil3331
Visitor
3 0 0

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?

 

 

WRSR
Visitor
2 0 0

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

RiddleOil3331
Visitor
3 0 0

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

WRSR
Visitor
2 0 0

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.