live search plugins and relevanssi_modify_wp_query
-
I’ve tried several plugins to implement live (AJAX) search using WordPress – SearchWP Live Ajax Search and Dave’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.
But both bypass the
relevanssi_modify_wp_query
hook that I’ve defined to handle custom query string params I’m passing ( as per https://www.relevanssi.com/knowledge-base/multiple-custom-taxonomies/ ). I can see the params are sent using the Chrome dev tools.As an example, Dave’s Live Search hits this URL:
/wp-admin/admin-ajax.php?s=alcohol&target_audience=parents&action=dwls_search'
When I go to wordpress rendered version of the same search terms, ie
/?s=alcohol&target_audience=parents
the hook is called and I see correct taxonomy filters applied.
- The topic ‘live search plugins and relevanssi_modify_wp_query’ is closed to new replies.