This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 3 voices.

Last updated by Diego Pereira 1 year, 3 months ago.

Assigned support staff: Diego Pereira.

Author Posts
February 9, 2019 at 9:32 pm #3178783


I am trying to: get language-specific search results

Link to a page where the issue can be seen: hidden link
I expected to see: search results for .net (English is the secondary language)
Instead, I got: search results for .de (German is the primary language)

Already tried Relevanssi and restrict or unrestrict search results. It would still redirect to .de but at least the English search results would show also. I deactivated the plugin. My goal is to see .de search results on .de and .net search results on .net
Thank you for your help!

February 11, 2019 at 4:16 pm #3184076

Diego Pereira

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @patrick Ollivier, welcome to the WPML support Forum!

Probably your search form is without the language attribute. Please take a look at this link to see how to add it:

Please let me know if it worked for you.

All the best,

February 11, 2019 at 4:20 pm #3184115


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)


I can see this problem on your site. But after that, I search if I switch to English I can see the search results in .net (English).

Please check the following.

1. In Settings -> General please check that both the Home URL and Site URL are with HTTPS. In the debug information it looks like this, and this is wrong.
SiteURL hidden link
HomeURL hidden link

2. Please make sure that in WPML -> Languages -> Make themes work multilingual the option 'Adjust IDs for multilingual functionality' is checked. If it is not checked, please check it, save the settings, and see if it helps.


February 12, 2019 at 12:44 pm #3188539


Thanks, not resolved yet.
I use the GreatMag theme and before contacting you here I couldn't find the code for the search form to replace it with the code.
Sure you can change the language after sending the search request but rarely a user would do that.
Changed to HTTPS, no difference.
The option you mentioned was already activated.
One thing I noticed: When the language in WPML backend options is set to German (default) both wordpress and website URLs are set to .de. When it's English, wordpress URL changes to .net and website URL stays on .de. When I change the latter to .net, the website search result in English change to .net BUT when I wanna change the website language to German, it doesn't work anymore. It can only be accessed by typing the .de URL and the search ALWAYS results in .net

Any new ideas? 🙂

February 13, 2019 at 5:43 pm #3195689

Diego Pereira

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

The theme Greatmag is not listed at our compatibility themes list:

This seems to be a compatibility issue. In these cases, these are the procedures:
- Install the theme in a clean installation and reproduce the problem in this new installation. So we can isolate it and do some testing without the interference of server settings or other plugins
- After this, I will check the problem in this new installation and look for a quick solution
- If I can not find a solution, I will forward the problem to our compatibility team
- The compatibility team will do some more testing and will contact the product author to fix the issue

I created a test website with a clean WordPress install. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the theme to this test install, setup it the same way as in your website (using the same options) and create some dummy content to reproduce the issue. Please note that we only need the theme and the related functionality, you don't need to setup a entire website or clone your existing site.

After that, please send us clear steps on how to see/reproduce the issue on this test install. We will run some tests.

Kind regards,

The topic ‘[Closed] Search redirects to Primary Language’ is closed to new replies.