What Is The Max Pagination Limit Per For Loop?

What is the max number of items returned per for loop in Liquid? The answer to this question:

https://community.shopify.com/c/Shopify-APIs-SDKs/customer-orders-not-returning-all-orders/m-p/446589

states that is is 250. The official Shopify page lists the max as 50:

https://help.shopify.com/en/themes/liquid/tags/theme-tags#paginate

Has anyone tested this and know the actual number? If it matter, this is specifically for the customer.orders array.

1 Like

Hello lldevs,

You can query up to 50 per page, Shopify won’t allow more than 50 , in order to maintain server load balance.

Hey there, @lldevs

Do you want to display more products or articles using increasing its limit?

All the Best,

Anybody find a solution to increase the loop count? The solutions I’ve found and that are mentioned here are not working. Doing just a loop on customer.orders array as well. Caps at 20.

You can use {% paginate %} as a wrapper for your loop in order to increase query limits.

{% paginate blogs.articles by 500 %}
     ... the loop ...
{% endpaginate %}

At least for me it is allowing bigger numbers like that. But I don’t render all the results. Mostly I’m using it when the posts list is big and I need to sort by tags or something else.