[Resolved] SearchWP Live Search

Home Forums Support [Resolved] SearchWP Live Search

Home Forums Support SearchWP Live Search

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #420110
    Michael Largue

    How can I connect the above plugin to the GP Navigation Search? This is the link to the above plugin’s documentation…

    https://searchwp.com/extensions/live-search/

    #420313
    Tom
    Lead Developer
    Lead Developer

    You could try this function:

    add_filter( 'generate_navigation_search_output', 'tu_nav_live_search' );
    function tu_nav_live_search() {
        printf(
            '<form method="get" class="search-form navigation-search" action="%1$s">
                <input type="search" class="search-field" value="%2$s" name="s" title="%3$s" data-swplive="true" />
            </form>',
            esc_url( home_url( '/' ) ),
            esc_attr( get_search_query() ),
            esc_attr_x( 'Search', 'label', 'generatepress' )
        );
    }
    #420338
    Michael Largue

    Hi Tom
    Unfortunately, it does not work. Instead of returning progressive actual items found (ajax), it behaves in the same manner as it originally di.

    #420340
    Tom
    Lead Developer
    Lead Developer

    According to their instructions, that should be all that’s needed. Any chance you can link me to your site?

    #420342
    Michael Largue

    Hi Tom
    Correction, it does work. I forgot to activate it. Doh! Thank you very much.
    Regards
    Michael

    #420344
    Michael Largue

    I forgot to mark it as resolved…

    #420346
    Tom
    Lead Developer
    Lead Developer

    Glad I could help ๐Ÿ™‚

    #1021953
    Karol

    The function seems to work partially now. Each link from the result box needs to be double-clicked in order to open a page. See here

    Any ideas on how to fix it?

    #1022136
    Karol

    Update: I’ve just found that the problem doesn’t occur when I use the search widget. The navigation search still needs a double-click. Could you please take a look at the CSS settings of the nav search and the result box? Maybe there’s a conflict between the two properties.

    #1022185
    Tom
    Lead Developer
    Lead Developer

    That’s strange, it almost looks like a bug with the focus. Any chance you can report it to the plugin author? They might know why this could happen/what we can do to fix it. Maybe just removing focus once the results are shown would fix it.

    #1022443
    Karol

    Nevermind, Tom. I’m now using Dave’s WordPress Live Search and it’s almost perfect. I have one issue with CSS but I’m opening a new ticket to solve it.

    Thanks for your help anyway!

    #1022718
    Tom
    Lead Developer
    Lead Developer

    No problem ๐Ÿ™‚

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.