WordPress does not find author pages in search
I used this extra query in search.php: $search_string = esc_attr( trim( get_query_var(‘s’) ) ); $wp_user_query = new WP_User_Query( array( ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘first_name’, ‘value’ => $search_string, ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘last_name’, ‘value’ => $search_string, ‘compare’ => ‘LIKE’ ) ) ) ); With a custom loop: <?php … Read more