Search in a header, display on a archive page.

Forums › Forums › Search & Filter Pro › Search in a header, display on a archive page.

Tagged: , , , ,

Viewing 2 posts – 11 through 12 (of 12 total)
  • Anonymous
    #221174

    It looks like this now : http://mysite/myresultsslug/?_sf_s=mysearchword

    Trevor
    #221184

    Then you would need something like this, in your child theme functions.php file:

    function sandf_change_search_url_rewrite() {
    	if ( is_search() && ! empty( $_GET['s'] ) ) {
    		wp_redirect( home_url( "myresultsslug/?_sf_s=" ) . urlencode( get_query_var( 's' ) ) );
    		exit();
    	}	
    }
    add_action( 'template_redirect', 'sandf_change_search_url_rewrite' );
Viewing 2 posts – 11 through 12 (of 12 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.