0

So, i'm trying to trigger auto suggestion for search (using plugin) and it wont work on the front end search bar. However the plugins (all that I have tested) seem to work fine at dashboard area (back-end search bar above "All posts") which means that plugins are working fine, but my search field is not functioning properly or the code isn't right for the plugins to function properly. Please note, Am not using get_search_form(), my code for creating search field is :

<div id="header-third"> 
    <?php if ( get_theme_mod( 'myknowledgebase_search' ) ) {
        $search_title = esc_attr( get_theme_mod( 'myknowledgebase_search' ) );
    } else {
        $search_title = esc_attr__( '', 'myknowledgebase' );
    } ?>


    <form role="search" id="post-filter" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 
        <input type="text" class="search-field" placeholder="<?php echo $search_title; ?>" value="<?php echo get_search_query() ?>" name="s" title="<?php echo $search_title; ?>" /> 
        <input type="submit" class="search-submit" value="<?php _e( 'GO', 'myknowledgebase' ) ?>" />
        <input type="hidden" name="post_type" value="post" />
    </form>

</div>
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Maryam
  • 11
  • 2
  • When you use the frontend search, use the browser dev tools to check if there is a JavaScript error? If so, it might offer some clues – Lorna Mitchell Apr 12 '18 at 10:35
  • @LornaMitchell No, there seems no JavaScript issue. I tried to install a "Voice Search" plugin too, but looks like no plugin is working for the front-end search fields. – Maryam Apr 17 '18 at 11:37

0 Answers0