Wordpress + Algolia query parameters conflict Wordpress + Algolia query parameters conflict wordpress wordpress

Wordpress + Algolia query parameters conflict


It seems like you're aware of this, but since others could stumble upon your question, I'll just state here that the Algolia for WordPress integration is, at the time of the writing, currently in beta and not supported (see the warning in the repo's README).

Also, based on the parameters you're talking about, it seems like you're using the latest version in the develop branch of the repository.

In this version, the query parameters are added in the URL by a library used internally called instantsearch.js.


This library, on initialization, exposes the urlSync.useHash parameter which will make the library store these parameters in the hash instead of the query parameters. Just set it to true.

If set to true, the url will be hash based. Otherwise, it’ll use the query parameters using the modern history API.


Since here there seems to be only one parameter which causes trouble, the urlSync.mapping parameter might be a better solution. However, I'm not sure this option is available in the instantsearch.js version the integration is using.

Object used to define replacement query parameter to use in place of another. Keys are current query parameters and value the new value, e.g. { q: 'query' }.

In your case, this would be { p: 'new_parameter_name_that_wont_conflict' }.