Blog
Author: Anne
02-19-2025 7:08 AMHiding Products from Recommendations on Your Shopify Store
As e-commerce store owners, we're always seeking ways to enhance the customer experience. Product recommendations are powerful tools for increasing sales, improving SEO, and reducing cart abandonment. However, there are times when you might want to hide specific products from the "You May Also Like" or recommendation sections of your Shopify store.
Why Hide Products from Recommendations?
There are several reasons to exclude certain products from appearing in recommendations:
Seasonal Items
Displaying winter coats during the summer isn't ideal. Hiding seasonal items ensures a relevant shopping experience, showcasing products that match the current season.
Out-of-Stock Products
Recommending items that are out of stock can lead to customer frustration. By hiding unavailable products, you prevent disappointment and maintain trust with your shoppers.
Exclusive or VIP Products
You might offer certain products exclusively to a select group of customers. Keeping these items hidden from general recommendations maintains their exclusivity and caters to your VIP clientele.
Strategic Selection
Carefully choosing which products to hide can support your inventory management, seasonal promotions, or specific sales strategies. It allows you to highlight items that align with your current marketing focus.
Streamlining Product Catalog
When dealing with discontinued products or exclusive deals, hiding them from search and recommendations ensures a streamlined browsing experience. This focuses customers' attention on relevant and available offerings.
The Solution: Tagging and Liquid Code Modification
If you're using Shopify's Dawn 15 theme, you can control product recommendations by tagging the products you want to hide and modifying your theme's code.
Before making any code modifications, always ensure you create a copy of the theme first. Test all your changes on this copy to confirm everything works perfectly before publishing it to the live theme. This precaution helps prevent any issues from affecting your main theme and keeps your work safe.
Step-by-Step Guide
Tag the Product as "Hidden":
Open the product page that you want to hide from recommendations in your Shopify admin.
In the product details section, add the tag 'hidden'. This tag will be used in the code to identify products to exclude from recommendations.
Edit Theme Code
Go to Online Store > Themes > Edit Code.
Open the related-products.liquid file.
Within the loop that displays product recommendations, update the code to exclude products with the hidden tag.
{% unless recommendation.tags contains 'hidden' %} {% endunless %}
Conclusion & Important Considerations
By implementing this method, you can effectively control which products appear in your recommendations, leading to a better shopping experience for your customers and potentially increased sales. Before you proceed, keep these points in mind:
Theme Variations: The exact location of the code for product recommendations might differ depending on your specific Shopify theme. Always double-check your theme's structure.
Empty Spots: Since the hidden product is not displayed and not automatically replaced, an empty spot may appear in the recommendations section. You'll need to consider how to address this.
Testing: Always test your changes in a development or staging environment before applying them to your live store to avoid unintended consequences.
For any questions or further assistance, please don't hesitate to reach out. Simply leave us a message, and we will respond to you as soon as possible. We're here to help and look forward to working with you!