WordPress search posts by author name with autocomplete
The WP_User_Query uses the parameter search rather than s https://developer.wordpress.org/reference/classes/wp_user_query/#search-parameters So try this instead $args = array ( ‘role’ => ‘author’, ‘search’ => esc_attr( $_POST[‘keyword’] ), );