Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I recently added digital products that are $0 and are added as gifts when a customer adds another product to their cart. But I am noticing these products are appearing in my search bar and I am also afraid they will start to appear in product recommendations. Is there any way to block specific products from appearing in these fields?
Sample Product: https://wearthepeace.com/products/your-purchase-is-providing-a-brand-new-article-of-clothing-to-a-hu...
Thanks!
Hi,
You can add a tag on those digital products that are $0 and when search results are displayed. Add some liquid code to hide those products.
Thank you for the suggestion, do you know what liquid code that would be?
{% unless product.tags contains 'tag_name_here' %}
{% include 'product-grid-item' %}
{% endunless %}
Here is an example, you can use the "unless" ternary operator to do so.
However, you may need to look at this solution to hide the items from the search.
Thank you for the information, where would I add this?
To hide in the search bar I recommend using this, recommendations might be a little bit more difficult. However, I will update you when I find the correct solution. This guide will wall you through step by step on how to remove it from shopify + google search.
https://rusticated.co/ecommerce/shopify/how-to-hide-products-from-shopify-search/
Here is a viable solution to hide them from product recommendations too! Read through the entire post so you can see which file to alter. Also, if you have trouble then just shoot me a reply or DM and a copy of your current file code, and I will show you where to put it.
Hi! Im facing the same issue and I'm using the sense theme. I tried following the post but could find my way around it. Could you pleas help me?
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025