Archived topic
Navigation Search does not work
7 replies · Started by eduard sans on April 19, 2017
Hi Tom, I've been looking through the forum but i don't seem to find any topic related. My Navigation search does not work, I mean, from a visual way it does, it allows you to write whatever you're looking for but then I press enter and it goes nowhere, it just reloads the homepage again. It's weird because in some other inner pages we have the search bar in the sidebar and it works perfectly.
Probably you'll need to check it so here's the homepage:
https://vickiviaja.com/de/willkommen/
Hi there,
Looks like something is overwriting the search.php template.
Can you try #1 on this page?: https://docs.generatepress.com/article/debugging-tips/
yeah! looks like I found it. The 'Polylang' plugin seems to interfere somehow. Any ideas?
Hmm, seems strange - a lot of people use that plugin with no issues.
If you use a regular "Search" widget in Appearance > Widgets - is the result the same?
That's the weird thing, as i said previously, when using the regular search widget it works perfectly. But somehow something in the polylang code interferes with the search only when displayed on the main navigator.
the plugins i have installed are pretty basic and safe (I think), just in case you wonder if there would be sth related to them:
- akismet anti-spam
- cookie notice
- elementor
- elementor pro
- gp premium
- ithemes security
- polylang
- polylang theme strings
- w3 total cache
- wp smush
- yoast seo
I also had some "copy paste" php code in the functions.php and in case there was sth interfering I removed it all, and still the search didn't work. So I'm getting out of ideas xD.
Hmm, just tested it using Polylang and didn't find any issues.
The navigation search box results in the same behavior as the search widget (?s=my-search-string).
Can you try clearing your total cache and then deactivating that plugin?
OMG! It worked! Can't thank you enough Tom! amazing support as always :).
BTW if it's not much to ask, I'd like to understand what was the problem (if you could sum it up) just in case it happens in the future with another website. Thank you again!
Caching plugins can cause weird problems sometimes, as they alter the output/order of scripts etc.. I couldn't tell you exactly what it was doing, but it's common to see caching plugins break things :)