Tagged: language switcher, search, wpml
I noticed that if you click “search” without entering anything, the language switcher does not display (see the link below). In the WPML settings I have it set to display and direct you to the home page if there isn’t a version of the page you are on that is translated. That works fine for everywhere other than here. I contacted WPML and they said it most likely is a theme related issue. If you could offer any help related to this it would be great.
Hey NicomIT,
Thank you for using Enfold.
Did you modify the language switcher? Please post the login details in the private field. We’ll check the settings.
Best regards,
Ismael
Hi Ismael,
No I don’t believe anything was modified. Below is link and login to a staging copy of the website.
Ryan
Hi,
I can’t access the Appearance > Editor panel through your dashboard. Please enable it or post the FTP details in the private field.
Best regards,
Ismael
Hi Ismael,
That should be activated now.
Ryan
Hi,
It seems to be an issue with the W P M L function “icl_get_languages”. It returns nothing when the search query is present. Please provide the FTP details in the private field. We would like to do a few tests.
Best regards,
Ismael
Hi Ismael,
The info you requested is in the private info below.
Ryan
Hi,
I can’t connect to the file server. The login info is incorrect.
Best regards,
Ismael
Are you using FileZilla? If so, it should work if you connect using ‘SFTP – SSH File Transfer Protocol’.
Hi,
I had to modify the plugin’s sitepress.class.php file to fix the issue. The plugin unsets the languages when the post_type query var is blank or is not set.
Line 2825:
if( $_GET['s'] == '' ) {
$this->wp_query->query_vars['post_type'] = array();
}
Let us know if you encounter any issues. This is not a critical issue, so I wouldn’t bother that much if I were you, because users will only get to that page when they click the search button accidentally without entering any keyword.
Best regards,
Ismael
Awesome! Thanks very much for the help with that.
Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon