Hide a collection of Products From Product Recommendations

AI-generated summary

Goal: Exclude products tagged “_hidden” (in a “Hidden” collection) from Shopify’s product-recommendations section.

Context: The poster shared part of product-recommendations.liquid (Liquid is Shopify’s templating language) and suspected an if-statement filter but wasn’t sure where to place it. The snippet configures useRecommendations and Flickity carousel options; no filtering logic was provided.

Updates:

  • Initial “solved” claim was retracted. The poster ultimately stopped using Shopify’s built-in recommendations and switched to a paid third‑party app. As a temporary workaround, they manually set featured products.
  • Another participant turned off recommendations entirely and is seeking a native solution.
  • A contributor shared a community thread link they tested and said works: https://community.shopify.com/topic/1213359.

Technical note: Shopify’s product recommendations are auto-generated; hiding items typically requires template logic to exclude products with certain tags/collections (e.g., “_hidden”/“Hidden”) or using an app.

Status: No confirmed in-thread Liquid-based solution; the linked external thread is the most concrete lead. Discussion remains open with unanswered implementation details.

I am looking to hide a selection of products from my product-recommendation section. I tagged all these products with _hidden so they are automatically added to a collection called “Hidden”. I want to hide this collection from my recommendations section.

Here is the code for product-recommendations.liquid not including the schema. i know i need an if statement but don’t know where to put it.

{%- assign use_recommendations = true -%}
{%- assign hand_picked_count = 0 -%}

{%- for block in section.blocks -%}
  {%- if block.settings.product != blank -%}
    {%- assign use_recommendations = false -%}
    {%- assign hand_picked_count = hand_picked_count | plus: 1 -%}
  {%- endif -%}
{%- endfor -%}

{%- capture section_settings -%}
{
  "productId": {{ product.id | json }},
  "useRecommendations": {{ use_recommendations | json }},
  "recommendationsCount": 4
}
{%- endcapture -%}

{%- capture flickity_options -%}
{
  "prevNextButtons": true,
  "pageDots": false,
  "wrapAround": false,
  "contain": true,
  "cellAlign": "center",
  "watchCSS": true,
  "dragThreshold": 8,
  "groupCells": true,
  "arrowShape": {"x0": 20, "x1": 60, "y1": 40, "x2": 60, "y2": 35, "x3": 25}
}
{%- endcapture -%}

I solved myself.

can you tell me how you solved this? I need to do the same thing

Fake news. The solution I used didn’t work, BUT I stopped using the recommendation engine that is built in and started using a different app for it. it was not cheap. the solution I used before this was just setting whatever products I want as the featured products.

OKay thanks I appreciate it. I have the recommendations turned off
completely right now which is not good. appreciate the reply!

I found this solution on a different thread, tested it and it works for me: https://community.shopify.com/topic/1213359