we are facing a tricky problem with our bilingual WordPress website and need help. We are using the “Highend” theme and have a website that is available in both English and German. The website is configured to be accessible at website.com for English content and website.com/en/home for German content. We are also using Polylang.
The main problem lies in the search functionality of the website. When users search for content on the German site (website.com/de), they are directed to the search results page, but it only shows the English articles (i.e. the results from website.com/?s=keyword instead of website.com/de/?s=keyword). We would like the search function on the German page to only show German blog articles. We tested it with the twenty-twenty theme and it worked, so there is a problem with the theme.
What I have tried:
Checked the theme’s searchform.php and search.php files, but am unsure how to customize them for this specific functionality.
How can we solve this problem?