[Plugin: Nice Search] changing "search"
-
I’m having the same request as Martin here: https://www.ads-software.com/support/topic/customise-the-search_base-prefix-?replies=9
I’m using the following code:
function cws_nice_search_redirect() { if ( is_search() && strpos( $_SERVER['REQUEST_URI'], '/wp-admin/' ) === false && strpos( $_SERVER['REQUEST_URI'], '/search/' ) === false ) { wp_redirect( home_url( '/search/' . str_replace( array( ' ', '%20' ), array( '+', '+' ), get_query_var( 's' ) ) .'/' ) ); exit(); } } add_action( 'template_redirect', 'cws_nice_search_redirect' );
in order to have a search permalink which looks like this:
https://www.mysite.com/search/search+term/I’d like to change the term “search” with the italian term “ricerca” (https://www.mysite.com/ricerca/search+term/) but it doesn’t work.
Any suggestion?
- The topic ‘[Plugin: Nice Search] changing "search"’ is closed to new replies.