Meta Box
Support Forum
Support › MB Views › Sorting in a View
Is it possible to make a certain sorting within a view? The loop {% for post in query.posts %} shows the posts sorted by ID in descending order. I'd like to have a random order.
{% for post in query.posts %}
Many thanks in advance Wilfried
Hi,
Please follow this documentation to create a custom query https://docs.metabox.io/extensions/mb-views/#custom-query you can pass the argument sort to the function get_posts() to sort the posts.
get_posts()