Liquid, JavaScript, themes, sales channels
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.
Thanks!
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.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024