hi
my website on tinker theme displays only last 50 blog posts, i need the pagination so the older posts could also be displays
thanks in advance for the help
Kamran
hi
my website on tinker theme displays only last 50 blog posts, i need the pagination so the older posts could also be displays
thanks in advance for the help
Kamran
I checked the Tinker theme code and found the problem in the main-blog.liquid file. The theme displays only the latest 50 articles because the blog article loop does not include pagination.
I have updated the file and added pagination. This keeps 50 posts on each page and adds page numbers with Previous and Next buttons, allowing visitors to access all older blog posts.
First, duplicate your theme as a backup:
Shopify Admin → Online Store → Themes → … → Duplicate
Download the updated file here:
Open:
Online Store → Themes → … → Edit code
Under the Sections folder, open:
main-blog.liquid
Select and delete all the existing code in that file.
Open the downloaded file, copy all its code, and paste it into main-blog.liquid.
Click Save.
Open your blog page and scroll to the bottom. You should now see pagination controls for accessing older posts.
This solution is specifically for the Tinker theme’s main blog page.
The 50-post limit is Shopify’s default - the blog listing shows the most recent 50 unless the template wraps the article loop in a paginate tag. You can fix it inline without swapping the whole file, which I’d suggest over pasting a full replacement you can’t diff.
Online Store > Themes > … > Edit code, open Sections > main-blog.liquid. Find where the articles loop starts (something like {% for article in blog.articles %}) and wrap it:
{% paginate blog.articles by 12 %}
{% for article in blog.articles %}
... your existing article markup stays exactly as-is ...
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
The {% paginate ... by 12 %} opens right before the for loop, {% endpaginate %} closes right after it, and {{ paginate | default_pagination }} renders the Previous/Next links. Set ‘by’ to whatever per-page count you want (up to 50). Duplicate the theme first so you can roll back, and if there’s already a {% paginate %} higher up, don’t nest a second one - just change its ‘by’ number. If Tinker assigns the loop to something other than blog.articles, match the paginate tag to whatever the for loop is iterating over.
Hi @skamranadeel ,
Shopify has a strict platform limit that allows a maximum of 50 items to be loaded on a page unless pagination is explicitly defined in the liquid code.
To add pagination to your Tinker theme’s blog page, you will need to wrap your blog loop in a paginate tag. Here is how to do it:
Find the area where your articles are being looped. It will look like {% for article in blog.articles %}.
You need to wrap this section/grid inside a paginate block.
At the very top of the file, add this line to set the limit per page (for example, 12 posts per page):
{% paginate blog.articles by 12 %}
Scroll to the bottom of the file (just after the closing grid or the end of the article loop) and add the pagination links code:
{%- if paginate.pages > 1 -%}
{% render 'pagination', paginate: paginate %}
{%- endif -%}
{% endpaginate %}
Click Save.
Hope this helps!
Thanks!