How to fix a 403 error on search form in WordPress and Polylang
I use Polylang plugin to make a multilingual website.
I also use custom theme, but I got a 403 error on search form in English pages.
I double-checked permissions on my website, searchform.php, unfortunately they didn’t work.
Then I googled for that, and finally I found a solution.
The way to fix 403 error is here:
First, go to Languages > Settings > URL modifications in the administration menu.
Next, check “The front page url contains the language code instead of the page name or page id.”
In addition to this setting, you can set these items to simplify the front page URL.
- Hide URL language information for default language
- Remove /language/ in pretty permalinks
- The language is set form the directory name in pretty permalinks
The front page’s URL contains slug, i.e. “https://chappytabby.com/en/top-2” except the default language unless you check “The front page url …” item.