• Resolved Alje

    (@adminalje)


    Hello Author/Support,

    I’m fairly new with the plugin and it works awesome, using the FREE version for now.

    I’m just trying to know if it’s possible to ignore the “space” on the search query?

    For example:
    When I put “NTUSB” it shows the correct search results
    but when I put “NT USB” (with space), it shows a completely different wrong search results.

    Thank you!
    Alje

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

    (@mihail-barinov)

    Hi,

    Please try to use following code snippet

    add_filter( 'aws_search_terms', 'my_aws_search_terms' );
    function my_aws_search_terms( $s ) {
        $new_s = implode( '', $s );
        $s[] = $new_s;
        return $s;
    }

    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.

    Also after adding this code you will need to go to the plugin settings page and click the ‘Clear cache’ button.

    Regards

    Thread Starter Alje

    (@adminalje)

    Hello ILLID,

    I followed all your instructions but there is no changes.
    The website I’m working on is pacifichifi.shop.

    and try to search on “NT USB”, it will not show the product.
    if you search “NTUSB” it will show up.

    Thank you!

    Thread Starter Alje

    (@adminalje)

    Not really sure what’s happening on that specific product query.

    The author of the theme I’m currently using says to put the code:

    function electro_product_search() {
    if ( is_woocommerce_activated() ) { ?>
    <div class=”site-search “>
    <?php echo do_shortcode( ‘Your seach shortcode’ );
    ?>
    </div>
    <?php
    }
    }

    I just want to know what SHORTCODE from you do I exactly put here?
    I tried “aws_search_form” but the search box was gone and was just replaced with the text “aws_search_form”

    Hope you’ll give some answers to this.

    Thank you.

    Thread Starter Alje

    (@adminalje)

    Got some answers. Nevermind. thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ignore “space” in the search query’ is closed to new replies.