Skip to main content

How to display blog posts in random order?

I have implemented a display of blog posts on the another page using the usual snippet from the documentation. It would be preferable though, that the posts be displayed in random order rather than chronological. Each time the page loads, order should be shuffled.

How can I use liquid to do that? (I could probably do it using jquery but I'd rather not)

Official response from

It isn't possible to display elements from a liquid array in a random order, as liquid does not use a random number generator. The blog posts are served via an array, so it isn't possible to display them in a random order.

Share this post

Showing 8 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.