Shopify themes, liquid, logos, and UX
Hi,
How can I hide a certain product from the recommendations/you may also like section? I'm using the Dawn theme.
Thanks heaps 🙂
Solved! Go to the solution
This is an accepted solution.
You can try this code by following these steps:
Step 1: Add 'hidden' tag for the products you want to hidden.
Step 2: Go to the online store ->Theme ->Edit Code.
Step 3: Find the related-products.liquid file and add code below to the file.
{% unless recommendation.tags contains 'hidden' %}
{% endunless %}
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Add a Tag to the Product:
Edit Dawn Theme Code:
{% for recommendation in recommendations.products %}
{% unless product.tags contains 'hidden-recommendation' %}
<!-- Your product display code -->
{% endunless %}
{% endfor %}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution and click like.
Was I helpful?
Sandesh Paudyal |
| Shopify Developer
Need help with your store?
sandeshpaudyal99@gmail.comFor quick response - Message Me : +9779851353732
Hi. Thank you for your response. I clicked edit code and searched for product-recommendations.liquid but I don't have it. Any other name I could search for?
If your dawn theme is 2.0 then the name should be the same. If not then access to the store is required for further investigation.
Thanks
Was I helpful?
Sandesh Paudyal |
| Shopify Developer
Need help with your store?
sandeshpaudyal99@gmail.comFor quick response - Message Me : +9779851353732
Hello @chameleon1
Welcome to Shopify Community.
Please check for related-products.liquid file
This is an accepted solution.
You can try this code by following these steps:
Step 1: Add 'hidden' tag for the products you want to hidden.
Step 2: Go to the online store ->Theme ->Edit Code.
Step 3: Find the related-products.liquid file and add code below to the file.
{% unless recommendation.tags contains 'hidden' %}
{% endunless %}
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Hello, I am using the Palo Alto theme. I've tried inserting the snippet, as shown in the correct file, but it is returning an error. Do I need different syntax because of the theme?
Here's the code appearing on the page:
{%- if block.type == 'related' and product.collections.size > 0 -%}
<div id="{{ related_id }}" data-related-products data-limit="{{ product_recommendations_limit }}" data-product-id="{{ product.id }}" {{ block.shopify_attributes }}>
{%- if recommendations.performed and recommendations.products_count > 0 -%}
{{ headings_markup }}
<div class="carousel__container">
<div class="carousel carousel--inactive carousel--mobile"
data-slider
data-slider-id="related-slider--{{ section.id }}"
tabindex="0"
>
{%- for product in recommendations.products -%}
{%- assign animation_delay = forloop.index0 -%}
{%- render 'product-grid-item',
product: product,
carousel: true,
columns_mobile: columns_mobile,
animation_delay: animation_delay,
section_width: section_width,
animation_anchor: related_anchor
-%}
{%- endfor -%}
</div>
</div>
{%- endif -%}
Did this work for you? It didn't work for me?
Hi, @Smeelah
I can help you with it. So I need to access your store as a collaborator if possible.
Hi @AnneLuo ,
Could you help me with the same problem please? I'm using symmetry theme
Hey @chameleon1 @rebornstudios @Smeelah
Just jumping on this thread here. If you'd like to try a no-code approach to fixing this, our app ConvertWise lets you show relatively more accurate recommendations than Shopify. (Some of our clients have talked about getting better engagement on their product pages, & significantly better cart conversions as well)
You can also choose to exclude/hide certain products from being shown.
Happy to chat if you have any further questions:)
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover 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, 2025