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 Kev O'Connor
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
Sign in with
For example, if I have a series of pages with the tag “issues” then I would like to be able to include 3 random issues on my front page instead of the 3 most recent issues.
Campaign Gears
Certified Architect