Search URL Rewrite and the search term will be counted twice.
-
hello.
Thanks for providing a great plugin.There is one problem.
The theme I use is changing the search URL.The code is below:
function fb_change_search_url_rewrite() {
if ( is_search() && ! empty( $_GET[‘s’] ) ) {
wp_redirect( home_url( “/search/” ) . urlencode( get_query_var( ‘s’ ) ) );
exit();
}
}
add_action( ‘template_redirect’, ‘fb_change_search_url_rewrite’ );Then, the number of searches for the search term will be counted twice.
I’d like to know a solution to this.thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Search URL Rewrite and the search term will be counted twice.’ is closed to new replies.