Hide Product From Recommended Products

maternallyhappy
Explorer
49 0 12

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

 

maternallyhappy_0-1704346724660.png

 

Thanks heaps,

 

Caitlin

 

Replies 3 (3)

Liqiud_xPert_SJ
Shopify Partner
730 93 115

Hi @maternallyhappy 

 

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

- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
maternallyhappy
Explorer
49 0 12

Hi thank you for your help, unfortunately I don't have that option under sections

 

maternallyhappy_0-1704353152173.png

 

maternallyhappy
Explorer
49 0 12

doesn't seem to work, thank you anyway