• Resolved Adriders

    (@adriders)


    Hi There,

    Our customer want to add to 2 searchboxes

    For an excisting customer we want to add 2 searchboxes on the same page. (I do this with the shortcode)

    When I search a text in a search box. That text filled in automaticly the other searchbox after the search. How can we prevent this?

    Kind regards,

    Adrider

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Looks like I found the solution for you. Please use following code snippet

    add_filter( 'aws_searchbox_markup', 'my_aws_searchbox_markup', 10, 2 );
    function my_aws_searchbox_markup( $markup, $params ) {
     $pattern = '/name="s" value="[\S\s]*?"/i';
     if ( isset( $_GET['type_aws'] ) && isset( $_GET['aws_id'] ) && $_GET['aws_id'] !== $params['data-id'] ) {
     $markup = preg_replace( $pattern, 'name="s" value=""', $markup );
     }
     return $markup;
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Regards

    Plugin Author ILLID

    (@mihail-barinov)

    Also this issue was fixed with the latest plugin release. SO now there is no need to adding this custom code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Header – 2 search boxes’ is closed to new replies.