WordPress.org

Ready to get started?Download WordPress

Forums

Nice Search
changing "search" (1 post)

  1. baga
    Member
    Posted 2 years ago #

    I'm having the same request as Martin here: http://wordpress.org/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:
    http://www.mysite.com/search/search+term/

    I'd like to change the term "search" with the italian term "ricerca" (http://www.mysite.com/ricerca/search+term/) but it doesn't work.

    Any suggestion?

    http://wordpress.org/extend/plugins/nice-search/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic