Horje Website
How to remove search slug WordPress?
Solved3.35K viewsArts and Entertainment
2

How to remove search slug WordPress?

Question is closed for new answers.
Selected answer as best

Nice post

Nice pistv

0

This post is straightforward, making it easy to read and comprehend without omitting any information. run 3 Great job!

Changed status to publish
1

<?php
echo'wwe';
?>

Posted new comment

Nice thanks

1

Thanks

Answered question
0

Here is solution

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' );

Answered question
0

How to remove only “search” name?

Answered question

 

Horje © 2011 - 2023