• annihilate

    (@annihilate)


    The view more results link doesn’t work on any pages other than the blog home page. This is because the link is:

    <a href="?s=' + resultsSearchTerm + '">View more results</a>

    So if you are on a page called about, the link then becomes /about/?s=

    The link needs to start from the blog root.

    I think something like the following would do the trick:

    <a href="<?php bloginfo('url'); ?>/?s=' + resultsSearchTerm + '">View more results</a>

    https://www.ads-software.com/extend/plugins/daves-wordpress-live-search/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dana Ross

    (@csixty4)

    That sounds about right. Thanks for catching that, and thanks for the patch!

    Thread Starter annihilate

    (@annihilate)

    No probs. I’m not sure if that particular section of code is evaluated on every key press. If it is there may be a more optimal place to get the root url just once, rather than keeping on calling the function. Anyway, thanks for a great plugin.

    Dana Ross

    (@csixty4)

    The PHP code runs when the browser requests the Javascript file and sticks the URL in there. It’s a hard-coded string as far as Javascript is concerned.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Dave’s WordPress Live Search] View more results link broken if not on blog root page’ is closed to new replies.