Repository navigation
Shopify collection stops showing products? Add pagination to a custom list #26
vistabylara-dev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
إذا كانت قائمة منتجات مخصصة تعرض جزءاً فقط من المجموعة، راجع الترقيم بين الصفحات. لا تحاول تحميل كل المنتجات في حلقة واحدة طويلة.
Free Shopify code series · 23/50 · Reviewed 24 October 2026
The problem and suggested fix
A custom collection list shows its first products but gives shoppers no way to reach the rest. A plain loop is not a complete catalogue navigation strategy. Paginate the collection's products and provide visible page links.
Before editing
Duplicate your theme and work in the unpublished copy. Save the original files. This is a bounded code suggestion, not a universal theme repair. Keep the live store unchanged until preview checks pass.
Placement
In a duplicate theme, use this bounded fragment to replace a simple custom product-list loop inside an existing collection-template section. The collection object must refer to the collection being viewed. Merge the translation object into the existing English locale root, and translate the same keys in all active language files. Do not paste this inside an existing paginate block or add a second competing collection grid.
Liquid fragment — not a replacement for the full section:
{% paginate collection.products by 12 %} <ul class="vbl-collection-links"> {% for item in collection.products %} <li> <a href="{{ item.url | escape }}">{{ item.title | escape }}</a> </li> {% endfor %} </ul> {% assign previous_label = 'vbl_pagination.previous' | t %} {% assign next_label = 'vbl_pagination.next' | t %} <nav aria-label="{{ 'vbl_pagination.label' | t | escape }}"> {{ paginate | default_pagination: previous: previous_label, next: next_label }} </nav> {% endpaginate %}Translation keys to merge into the existing locale object:
{ "vbl_pagination": { "previous": "Previous", "next": "Next", "label": "Collection pages" } }Applicability and limits
This deliberately displays text links, not a complete product-card grid. Keep your theme's existing product-card markup, filters, sorting, empty-state message and accessibility features when integrating pagination. Products must also be published to the relevant channel and belong to the collection. Pagination cannot fix unpublished products or collection-rule mistakes.
Check before publishing
Preview a collection with more than 12 visible products. Visit page two and the last page, then navigate back. Check that expected products are reachable without duplicate or skipped entries for the chosen sort order. Test 0, 1, 12 and 13 products, translated navigation, keyboard focus, mobile layout, sorting and filters. If Ajax filters are used, test their own section-update flow. A blank list needs an appropriate translated empty-state in your final theme.
Validation: The Liquid fragment and translation JSON passed Shopify's validation tool. No live merchant store was changed. Rendering, theme integration and commercial results have not been tested.
Rollback
Restore the original markup from your saved copy and remove only the translation keys introduced by this example if no longer used. If you published a modified theme and notice regressions, return to the saved working theme while diagnosing the cause.
Get help with your own store
Send Dr Lara your store URL, theme name, affected page and the change that preceded the problem. Start with free guidance and a free initial consultation. If you need implementation, the scope and fee are agreed separately before work starts.
Explore Shopify theme repairs and development with Vista by Lara
WhatsApp Dr Lara about this guide or call +971 50 799 4292.
Free guidance. No commitment. Practical implementation is separately scoped.
Share your experience
Did the problem start after a theme edit, an app installation, or a language change? Share a short sanitized example. Do not post passwords, tokens, customer data or private admin links.
Official references
Dr Lara · Vista by Lara · Dubai, UAE
All reactions