How can I add pagination to my atelier theme? all the products are on one page
Topic summary
A user is trying to add pagination to their Atelier theme, where all products currently display on a single page instead of being split across multiple pages.
Initial Solutions Provided:
- Check theme customization settings for âProducts per pageâ option in the collection settings sidebar
- If unavailable, manually add pagination code by wrapping the product loop in
{% paginate collection.products by 24 %}tags within the collection template file (typicallytemplates/collection.liquidorsections/main-collection.liquid)
Current Status:
- The user successfully implemented pagination showing 24 products per page
- Now requesting to change it to 16 products (4 columns Ă 4 rows)
- Additional issue: Products display in 5 columns on desktop instead of desired 4 columns, leaving the last row with only 1 product
Attempted Fixes:
- Changing the pagination number from 24 to 16 in the code
- Adding CSS to
assets/base.cssto control grid columns (minmax(280px, 1fr)), but adjusting the pixel value (300px, 320px) hasnât resolved the layout issue
Outstanding Issue:
The discussion remains open with the grid layout problem unresolved. Multiple developers have offered to access the store directly via collaborator code to implement the fix properly.
Could you please provide the URL of the current page of your store that you want to paginate?
@milly41 pagination code will need to be used into collection template to show pagination
Hey @milly41! The Atelier theme should have pagination built-in, but if all your products are showing on one page, there are a few things to check and fix:
First, check your theme settings:
- Go to Online Store > Themes > Customize
- Navigate to a collection page in the preview
- Look for Collection or Collection pages settings in the sidebar
- Find a setting called âProducts per pageâ or âNumber of productsâ and make sure itâs set to a reasonable number like 12, 20, or 24 (not something huge like 100)
If that setting doesnât exist or isnât working, hereâs how to add/fix pagination:
Go to Online Store > Themes > Actions > Edit Code and find your collection template file. This could be:
templates/collection.liquidsections/collection-template.liquidsections/main-collection.liquid
Look for code that displays your products. It should look something like this:
{% paginate collection.products by 20 %}
{% for product in collection.products %}
<!-- product display code here -->
{% endfor %}
{% if paginate.pages > 1 %}
{{ paginate | default_pagination }}
{% endif %}
{% endpaginate %}
If you see the product loop WITHOUT the paginate tags wrapped around it, thatâs your problem. You need to wrap the product loop with pagination tags.
The fix:
Replace the number 20 with however many products you want per page (max 50). The pagination links will automatically appear at the bottom when you have more products than the limit.
Quick example for Atelier theme:
{% paginate collection.products by 24 %}
<div class="product-grid">
{% for product in collection.products %}
{% include 'product-item' %}
{% endfor %}
</div>
{% if paginate.pages > 1 %}
<nav class="pagination">
{{ paginate | default_pagination }}
</nav>
{% endif %}
{% endpaginate %}
If youâre not comfortable editing code, let us know and weâll do that for you for free.
Cheers!
Shubham | Untechnickle
Hi Shubham, thanks so much for your reply! unfortunately Iâve checked the sidebar and canât see a setting to adjust the number of products per page. That would be great if you could please help me with the coding!
Hello @milly41
Go to: Online Store > Themes > Edit Code.
Open the collection template:
templates/collection.liquid or sections/main-collection-product-grid.liquid.
Adjust by 24 to how many products per page you want.
Let me know if youâre using collection.json + main-collection.liquid â the setup may vary slightly.
Find the product loop, usually:
{% paginate collection.products by 24 %}
{% for product in collection.products %}
<!-- product card -->
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
Itâd be our pleasure to help you with this. Please DM or email us your collaborator code, weâll send you the store access request and add the fixes to a copy of theme. Once youâre satisfied, we can publish the theme.
Looking forward to hearing from you,
Shubham | Untechnickle
just i cannot send well formatted code
now its good visible
delete full code and put this code to snippets/product-grid.liquid
Hi, what code do I need to use?
Thank you this worked! I currently have 24 products showing per page, how can i change this to 16 products per page? (4 columns by 4 rows)
Hello @milly41
In your Shopify Admin go to online store > themes â Customize â collecton â Product grid.
Hello @milly41
Please click on the collection, use it, and send me a screenshot.
find sections/main-collection.liquid then this part > {% paginate collection.products by 24 %} change to 16
A feature like pagination is kind of basic and should be in all the themes. I havenât checked atelier as itâs newly released but all other themes do have pagination implemented by default.
You may want to look to the settings for the collection template.
It could also be due to some bug, or you will need add it with code.
Thereâs another way to load the products is with a load more button so instead of displaying all products at once as you scroll user can click to load more products. It does add products on the same page but does not do all at once. So just a better ui and user interaction.
Check collection pages for this example site:
Thank you! is there a way to do 4 products in a row? as at the moment it is 5 products per row, so the last row only has 1 product and it looks a bit strange
go to assets/base.css and bottom put this code and save. > @media (min-width: 750px) {
.product-gridâgrid
{
âproduct-grid-columns-desktop: repeat(auto-fill, minmax(280px, 1fr)) !important;
}
}



