Algolia Wordpress plugin without Instantsearch.js - filtering results by taxonomy

Hello,

I’m using the Algolia Wordpress plugin (https://community.algolia.com/wordpress/) to replace the standard Wordpress search.

The search is working well, however, I’d like to extend the search results page to allow filtering by a Wordpress taxonomy.

I’ve selected the Use Algolia in the backend setting instead of Use Algolia with Instantsearch.js, because I need complete control over the UI.

This option states that it does not support filtering and displaying instant search results. However, I’m assuming this is referring to Instantsearch.js and there is still a way to filter the API query manually.

I need to either:

  • Filter the Algolia API search results by taxonomy, likely with facets. Can I customise the query that is sent to the Algolia API to include facet filtering?
  • If that’s not possible, is there a plugin filter that would allow me to filter the results (and adjust the global WP_Query) after the API query has completed?

Thanks in advance!

Hi there,

I just answered your question on Stack Overflow.

Let me know if that helps,

Best

1 Like

Using the algolia_search_params filter worked perfectly, thank you!

1 Like