Want to add my custom prepare query but add_filter doesn’t run
The WP_User_Query allows meta_query searches exactly like the other WP_*_Query classes. Example here: global $wpdb; $author_search = new WP_User_Query( array( ‘role’ => ‘subscriber’, ‘fields’ => ‘all_with_meta’, // if it’s a digit/int/float, use ‘meta_value_num’ ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, // you could try -1 as well. ‘nuber’ => 99999999, ‘meta_query’ => array( ‘key’ => ‘my_userpoints’, … Read more