Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Remove from facebook pixel › Reply To: Remove from facebook pixel
Ok then help me another way. I have changed the name of the default query string to “search” from “s”. But using the below code snippet
//Remove the default search var and add a custom one
add_filter(‘init’, function(){
global $wp;
$wp->add_query_var( ‘search’ );
$wp->remove_query_var( ‘s’ );
} );
//If the custom var is passed copy that over to the default “s” var
add_filter( ‘request’, function( $request ){
if( isset( $_REQUEST[‘search’] ) ){
$request[‘s’] = $_REQUEST[‘search’];
}
return $request;
} );
So the site works with https://newbook.therastore.co.nz/?search=collagen rather then https://newbook.therastore.co.nz/?s=collagen
But now your plugin is still referring back to “s” is not working when the “search” button is clicked. How do i update the input box so it uses “search” rather than “s” variable.