{"id":7311093,"date":"2016-04-23T13:38:57","date_gmt":"2016-04-23T13:38:57","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/relevanssi-live-search\/"},"modified":"2016-08-31T16:49:54","modified_gmt":"2016-08-31T16:49:54","slug":"relevanssi-live-search","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/relevanssi-live-search\/","title":{"rendered":"live search plugins and relevanssi_modify_wp_query"},"content":{"rendered":"<p>I&#8217;ve tried several plugins to implement live (AJAX) search using WordPress &#8211; SearchWP Live Ajax Search and Dave&#8217;s Live WP Search. The basics function OK, I have tested with Relevanssi enabled and disabled, and the AJAX results vary, so it looks like the plugin is being called for search.<\/p>\n<p>But both bypass the <code>relevanssi_modify_wp_query<\/code> hook that I&#8217;ve defined to handle custom query string params I&#8217;m passing ( as per http:\/\/www.relevanssi.com\/knowledge-base\/multiple-custom-taxonomies\/ ). I can see the params are sent using the Chrome dev tools.<\/p>\n<p>As an example, Dave&#8217;s Live Search hits this URL:<br \/>\n<code>\/wp-admin\/admin-ajax.php?s=alcohol&amp;target_audience=parents&amp;action=dwls_search&#039;<\/code><\/p>\n<p>When I go to wordpress rendered version of the same search terms, ie <code>\/?s=alcohol&amp;target_audience=parents<\/code> the hook is called and I see correct taxonomy filters applied.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/relevanssi\/<\/p>\n","protected":false},"template":"","class_list":["post-7311093","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7311093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7311093\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7311093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}