skip to Main Content

I have more than 100 collections in Shopify. How can I make a pagination or infinite scroll to show this list? Not a list of products in collection, but a list of all collections.

3

Answers


  1. I had this same issue and here’s how you paginate the list-collections.liquid template. In this example, 25, can be swapped with another integer or the string limit.

    {%- paginate collections by 25 -%}
         ...
         {%- for collection in collections -%}
              ...
         {%- endfor -%}
         ...
    {%- endpaginate -%}
    
    Login or Signup to reply.
  2. Shopify for loop can output a maximum of 50 results per page.
    Shopify Pagination

    Just like stated above, use {% paginate %} tag to increase the pagination number.
    I believe the maximum pagination you can set is 2000

    Login or Signup to reply.
  3. You should use AJAX to load them, Shopify has limitations of 50 products/collections per page, so you have to load the rest via ajax using some infinite scroll.

    Use code for infinite scroll for products and modify it to make it work with collections, I don’t think it will be difficult.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search