I am trying to:
follow https://toolset.com/forums/topic/display-random-posts-with-a-view/ to create a random order for users and realised that does not has a random order option.
How do I create a random order for users with a view?
Hi, unfortunately WordPress's User Query does not support randomizing the result order the same way a post query does: https://codex.wordpress.org/Class_Reference/WP_User_Query#Order_.26_Orderby_Parameters
Since Views uses WP_User_Query under the hood, there's nothing built in to provide that random ordering. This would require custom code that gets all the User IDs and returns a random one programmatically, or uses SQL to directly query the Users table in the database.
We offer one filter that might be useful here:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_user_post_query
You can use this filter to manipulate the result set produced by the View, before the results are displayed.
A quick search led me to some articles that have some code you might find helpful if you're interested in crafting your own custom solution:
https://www.wpbeginner.com/wp-tutorials/how-to-randomly-display-registered-users-in-wordpress/
https://wordpress.stackexchange.com/questions/127083/displaying-a-random-user-with-a-shortcode