X_recent_posts to random order

Hi there.
Is there any way I can change this code so it will do exactly the same thing but it will show posts tagged with the category in a random order instead of by the last publication date.

[x_recent_posts type="post" count="4" orientation="horizontal"  fade="true" category="category1"]

Hi Jason,

Thanks for reaching out.
By default, the order is the date of the x_recent_posts as the latest posts should be shown as the Recent Posts. Still, if you want to modify the code, please go through the following thread which may help you on this.


https://theme.co/forum/t/feature-6-most-recent-posts/54823/3

Please remember that code in the reference threads is sample code, and it varies from case to case, and we can’t be guaranteed it works in your case.

Thanks

Hi there,

Unfortunately not as these posts relate to something different. I simply (which might not be so simple) would like a random order on posts instead of date published as a random order will ensure that the posts at the end of each page are different rather than the same across all pages.

Hi Jason,

If I am able to understand it correctly, you want to show the Recent Posts randomly. Unfortunately, that is not possible with the Recent Post shortcode as it sorts the posts by date in descending order, and there is no other scope of randomizing that selection of posts.

What you are expecting is required custom development and that is beyond the scope of theme support. I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.

Thanks

Thanks @tristup - I think it would be very nice to consider adding different display formatting options for Recent X Recent Posts. Clearly it would not need to be called recent posts anymore, because it would do more than that. But looking through the forum it does seem that this particular item has had a number of questions raised against it and so I leave that for your consideration.

Hello Jason,

As mentioned by my colleague there is no option to set the post order in the classic recent post shortcode. I would suggest you use Looper to display the post-filter by category and set the post order by random.

Please have a look at the setting screenshot to show recent posts by random order.
tedt-Content-X

Hope it helps
Thanks for understanding

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.