Wordpress Search Page Issue

I’ve been using the Wordpress plugin for quite awhile and had it configured to “Use Algolia with Instantsearch.js” for the search page results. Worked fine for quite awhile but just recently noticed it is no longer working. Instant search still works but when you click to go to the search results page, it comes up empty. Also, once you get to that page, instant search no longer works.

I’m not exactly sure when this broke, but I did just recently update my php from 5.5 to 7.1.

If I switch to “Use Algolia in the backend” it does work but of course offers no filters.

I’m using version 2.9.3 of the wordpress plugin.

Any ideas how to fix? Are others having this issue?


1 Like


It think I just tried to answer your question on the ticket you send to our support service.

You didn’t precise that you indeed upgraded the PHP version.

I suspect that one of the plugin you are using is not working as expected.

Could you try disabling any caching plugin and try again?
Do you see any JS errors in the console?


Yes, that was me. I disabled litespeed cache and it works, so there does seem to be some new conflict there. (I say new because I’ve used this setup for many months with no issues.)

Here’s the error I see in the console when litespeed cache is on:

?s=cabernet:181 Uncaught TypeError: wp.template is not a function
at Object. (?s=cabernet:181)
at Function.each (jquery.js:384)
at HTMLDocument. (?s=cabernet:180)
at j (jquery.js:3148)
at Object.fireWith [as resolveWith] (jquery.js:3260)
at Function.ready (jquery.js:3472)
at HTMLDocument.J (jquery.js:3503)

I’m not technical at all so have no idea what any of this means but perhaps you can see something here?


Can you give me a list of the javascript files the plugin uses so I can try excluding them? I tried excluding everything I could find from js minification and combine and couldn’t get it to work. That said, if I turn js minification and combine off completely it does work so I’m guessing I’m just not excluding the right file.

Hey @jon, the files are the one in this folder: https://github.com/algolia/algoliasearch-wordpress/tree/master/js

Then it depends on what you have enabled (autocomplete / instantsearch).