Designed and developed By DrupalNetworks.com. Drupal Networks is a division of YAS Global.

Change the Search-URL of WordPress

function wpp_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', 'wpp_change_search_url_rewrite' );

Follow Us

Aliya's Tags