Incorrect search for multilingual pages
If you create multilingual web pages, you can use Polylang as a support. Especially in WordPress this tool is used very often. Sometimes everything seems to work. However, incorrect settings can only cause errors with special functions. So I was with the search widget of my theme and that of the Page-Builder Elementor. The search in the basic language (German with me) worked without errors. In the other language, with me English, the English articles were not found. There were different effects. Sometimes a 404 error, sometimes only German articles were displayed. Only the WordPress search widget worked fine. Is there an error in the widgets? no! After working through possible sources of error, I worked my way through to Polylang and checked the settings here. Then I finally came across the URL settings and was able to deactivate the option “Hide URL for the default language” in the 2nd part. In addition, I set the last option in the 2nd part (the URL of the title page …). This eliminated the problem. Where can I find this settings area? in the WordPress backend bar there is the “Languages” area. In the folding menu there is the option “Settings”. If you click on this option, you will be taken to the settings page. At the top is the URL settings area.
Here in the second part I made and saved the two changes. If necessary, you should clear the internal cache if you use such a thing. Also don’t forget the browser cache if enabled!!! Otherwise, the new settings will not be displayed, but the old bad pages will be displayed. Some website operators have not even noticed that their search function in the second language causes errors. Hence this little article. Today there was also an important update for Polylang (6-8-2019), which contains some adjustments to the current WordPress version.