Am citit cateva articole si am gasit urmatoarele coduri, dar nu stiu sigur daca functioneaza sau nu, dar pana iti ofera alta persoana care se pricepe, pot incerca aceasta varianta.
Prima incercare, se pune in functions.
function wpb_change_search_url() {
if ( is_search() && ! empty( $_GET['s'] ) ) {
wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) );
exit();
}
}
add_action( 'template_redirect', 'wpb_change_search_url' );
Daca nu functioneaza, incearca si asta, se pune in htaccess.
# Change WordPress search URL
RewriteCond %{QUERY_STRING} \?s=([^&]+) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]