How To: Paginated sorted blog articles?

Excursionist
17 0 1

I'm trying to create a paginated list with blog articles that are sorted by time of update.

 

Liquid error (sections/blog-template.liquid line 72): Array 'blog_posts_sorted' is not paginateable.

 
This is the relevant liquid code:

 

{% assign blog_posts_sorted = blog.articles | sort: "updated_at" %}

{%- paginate blog_posts_sorted | sort: "updated_at" by articles_per_page -%}

 

How do I paginate a sorted list of blog articles?

Shopify Partner
12063 1482 4355

@jao 

Thanks for post 

can you please try this code

https://www.shopify.in/partners/blog/shopify-pagination

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Excursionist
17 0 1

Thank you for your reply. 

I don't see how the code in that article solves the sorting problem. 

0 Likes
Shopify Partner
12063 1482 4355

@jao 

need also some custom code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Excursionist
17 0 1

Yes I understand and my question is, what kind of custom code should I be using because the docs don't provide any real information.

I appreciate you're trying to help but I hope you understand that "need some custom code" is not helpful. I already came to that conclusion and I tried custom code that didn't work but returned an error and now I'm trying to find out what the error means and how to solve it so I can have a sorted paginated list of blog posts.

 

0 Likes
Shopify Partner
12063 1482 4355

@jao 

Thanks 

can you please show me error

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Excursionist
17 0 1

Yes, see first post:

 

Liquid error (sections/blog-template.liquid line 72): Array 'blog_posts_sorted' is not paginateable.

 
0 Likes
Excursionist
17 0 1

BUMP

0 Likes