Including taxonomy in searches
First you want to make the query keys available so you can check them later: add_action( ‘init’, ‘custom_add_query_vars’ ); function custom_add_query_vars() { add_query_var( ‘location’ ); add_query_var( ‘tag’ ); } Then you want to set a tax_query by filtering the WP Query: add_filter( ‘pre_get_posts’, ‘custom_search_tax_query’ ); function custom_search_tax_query() { // check this is a search query … Read more