Step 3: Hide duplicate products from collections pages

Find the liquid file that renders your collections pages. It may be called something like collection-page.liquid. Find the code block that renders each product in the collection and wrap it in the the following unless statement:

{% unless product.tags contains "price_test" %}
 ...
{% endunless %}

In context, the code should look something like this:

{% for product in collection.products %}
   {% unless product.tags contains "price_test" %}
      {%  
         render 'product-thumbnail',
         product: product
       %}
    {% endunless %}
{% endfor %}

Last updated