WP_User_Query to bring back a list of users. I'm passing a list of specific users to be included in results. For example:
$user_ids = array( 1, 5, 9, 61, 24, 12 ); $args = array( 'include' => $user_ids, 'count_total' => true, 'search' => sanitize_text_field( $_GET['phrase'] ) ); $query = new WP_User_Query( $args );
Results are currently ordered by
user_login. How can I modify my query so that the results returned are ordered by my
$user_id array? For example, if 3 users are to be returned (let's say IDs 5, 61 and 12), then user 5 should be displayed first, user 61 second and user 12 third.