• Resolved cashismatt

    (@cashismatt)


    Hi everyone,

    I have modified my theme and put the search box in the header, above the menu.
    Unfortunately, it doesn’t work anymore, it doesn’t show me neither the product list neither the “spinning wheel” when I write something. Looks like something were wrong.

    Notice that if I put the search box in the body, it works well.

    You can see here how it looks like -> https://www.dropbox.com/s/t8itfijmlxpxcbk/Cattura.PNG?dl=0

    Can anyone help me please??

    Thanks

    • This topic was modified 6 years, 2 months ago by cashismatt.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    Can you give me the link where I can find this search form?

    Thanks.

    Thread Starter cashismatt

    (@cashismatt)

    I’m sorry but my website isn’t still online, I’m working on localhost..

    Plugin Author ILLID

    (@mihail-barinov)

    Ok. In this case can you open browser console window and look for any errors there when you try to search for something?

    Also please send me the screenshot of this.

    Thanks.

    Thread Starter cashismatt

    (@cashismatt)

    no errors unfortunately, neither when I type something neither if put click enter and do the research..

    Plugin Author ILLID

    (@mihail-barinov)

    So when you press enter key you see the search results page?
    Problem is only in ajax search?

    Thread Starter cashismatt

    (@cashismatt)

    Yes, exactly. I see the search page, I do not see ajax results.

    • This reply was modified 6 years, 2 months ago by cashismatt.
    Plugin Author ILLID

    (@mihail-barinov)

    Have you try to go to plugin settings page and set ‘Search Results’ option to ‘Both ajax search results and search results page’?

    Thread Starter cashismatt

    (@cashismatt)

    yes of course. Notice that if I put the code in the body page it works

    Plugin Author ILLID

    (@mihail-barinov)

    So its works in body but not in the header of your theme?

    How you add search form? With shortcode/function or using ‘Seamless integration’ option?

    Regards.

    Thread Starter cashismatt

    (@cashismatt)

    I simply replaced theme code with “<?php if ( function_exists( ‘aws_get_search_form’ ) ) { aws_get_search_form(); } ?>” in search-box.php

    you can see the file here

    https://www.dropbox.com/s/n09iqqmrn9qy9du/search-box.php?dl=0

    • This reply was modified 6 years, 1 month ago by cashismatt.
    Plugin Author ILLID

    (@mihail-barinov)

    You also need to replace

    <form role="search" class="header-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    <?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); }?>
    </form>

    with

    <?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); }?>

    Thread Starter cashismatt

    (@cashismatt)

    Thanks a lot, it worked.

    Thread Starter cashismatt

    (@cashismatt)

    Dear Illid,

    how can I add search box next to the “aws-search-field” such as

    <button type=”submit”><i class=”fa fa-search”></i></button> ???

    Thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PROBLEM WITH SEARCH IN HEADER’ is closed to new replies.