Redirect wordpress search query if its a tag
To do it in query handling stage, may use request hook which is when WordPress query is being setup. The term link is recommended by @Jacob Peattie using built-in get_term_link() instead of building it manually for more flexibility and error-proof. add_filter( ‘request’, ‘ws366006_check_request_query’ ); function ws366006_check_request_query( $query ) { // var_dump($query); // redirect checking if( … Read more