Limiting Impulse Theme Collections to a finite number

New Member
1 0 0

Hi!  I'm trying to limit a couple of my collections to a finite number.  For instance, new arrivals and best sellers.  I've tried searching the forums, but haven't found anything that works.  I'm using the Impulse Theme, and trying to limit those 2 collections to 25 items.  If I can't limit them, it basically is just a list of all my shops items.



Reply 1 (1)
29 1 2

It can be done by editing theme's collection template to paginate by 25 items only and writing a simple condition to hide pagination for those 2 specific collections. 

For example:

{%- paginate collection.products by 25 -%}
     . . .
    {% unless collection.handle == "new-arrivals" %}

      Your pagination links go here...
    {%- endunless -%}
{%- endpaginate -%}


Another option would be using a New Arrivals app to automatically untag new products after a specific period e.g. 45 days after creation. It won't limit you to 25 product but will make sure there are only new products in that collection.

Xmas Shopify app - beautiful falling snow animation
New Arrivals Shopify app - automatically tag/untag products based on creation/publishing date
Motion - scrolling text announcements
Stash Shopify app - hide products from search results and search engines