All things Shopify and commerce
Hi there,
I am wanting to hide a certain product from the recommended product section, if there any way of doing this? I have the prestige theme. www.maternallyhappy.com
The product is Myo-Inositol For PCOS
Thanks heaps,
Caitlin
Please follow the below instructiosn hopefully you get what you need also please accept the solution if it does work for you.
Go to "Online Store" > "Themes".
Click on "Actions" > "Edit code".
In the left-hand sidebar, click on "Sections" > "product-recommendations.liquid".
Scroll down to the product_recommendations block to exclude specific products from the recommendations, you can add a where filter to the for loop that iterates through the recommended products. For example, if you want to exclude products with the tag "exclude-recommendations", you can modify the loop as follows:
{% for product in product_recommendations.products %}
{% unless product.tags contains 'exclude-product' %}
// code to display recommended product
{% endunless %}
{% endfor %}
The unless statement checks if thetags property of the current product contains the "exclude-product" tag.
Thanks
Hi thank you for your help, unfortunately I don't have that option under sections
doesn't seem to work, thank you anyway
the code does what it should, however the product that is not displayed is then not replaced by another product and a empty spot is left:
any idea how to change that?
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025