• anonymized-14293447

    (@anonymized-14293447)


    It’s not working at all, but maybe my theme is not using the default WP search script and is using a framework instead (in this case angular.js). Do you know how I can check that and eventually tweak LiveSearch? this page’s header.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @arsenalemusica

    Hi! Thanks for writing.

    In short, I’d say yes, it is dependent on which search functionality is being used, and that the header of your site is using a non-native search functionality, not the native WordPress search.

    I think it’s a bigger question of how to tweak LiveSearch to make it work with the non-native search functionality on the site. I’d estimate that it would take some effort (some work) to make it happen.

    A good first step might be for your site’s developer to get out their coding tools, and start looking around the code to see how big a job it will be, for example start looking in “/js/daves-wordpress-live-search.js”, on line 57. (referenced below)

    @arsenalemusica , what do you think?

    — start details and references of how I came to learn the above: —

    It looks like Dave’s WordPress Live Search is triggered when it sees a search form where the input name is equal to “s”, like this:
    ...filter("[name='s']")...
    source: ( https://plugins.trac.www.ads-software.com/browser/daves-wordpress-live-search/trunk/js/daves-wordpress-live-search.js?rev=1486084#L57 )

    How does one know that the search on your site is not the native WordPress search? Compare the html code from a sample native WordPress search functionality:

    <form class="search-form" role="search" method="get" action="https://localhost/wp1/" autocomplete="off"> ... ...
    	... ...	  <input class="search-field" placeholder="Search …" value="" name="s" autocomplete="off" type="search">

    , with the html code from your site’s search functionality:

    <form class="ng-pristine ng-valid" ng-submit="doTopSearch()" ng-contoller="topSearch" style="position:static;"> ... ...
    		... ...	<input class="form-control ng-pristine ng-valid" placeholder=" nome azienda / parole chiave" ng-model="topsearch.keywords" type="text">

    Also one thing I saw on your site, that confirmed it’s not using daves search now, is that searching the html source of the page for “dave” comes up with no hits. Whereas a site with the daves search enabled and working comes up with many hits for that term.

    — end details and references —

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    Mjojo, the info you are giving me are precious. I’m keeping them safe so I can show it to the developer that one day hopefully will help me on this (and other issues).
    I actually have problems with this search-system because it makes multiple queries to the whole database and waits until it gets all the responses (from 6k companies) before it shows the results. I trust that WP default search doesn’t work like that, does it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is it framework dependent ?’ is closed to new replies.