This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is trying to display the WPML language switcher on their website using the Porto theme. It appears correctly on mobile devices but not on the PC view.
Solution:
If you're experiencing this issue, we recommend disabling the Porto language switcher in the theme options. You can find instructions on how to do this here: Porto Theme Options.
To use the WPML official language switcher, you should add it to your header PHP code via shortcode. This can be done using the Elementor option within Porto to build the header and then adding the WPML shortcode. For detailed guidance on adding language switchers using PHP and shortcodes, please visit: Adding Language Switchers Using PHP and Shortcodes.
Additionally, you may consult Porto theme support for specific instructions on where to add this shortcode in the header.php file.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML Support Forum.
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.
Tagged: Documentation request
This topic contains 10 replies, has 2 voices.
Last updated by Dražen 2 months, 1 week ago.
Assisted by: Dražen.
Author | Posts |
---|---|
October 9, 2024 at 9:11 pm #16272474 | |
georgiosS-12 |
Background of the issue: Symptoms: Questions: |
October 10, 2024 at 7:16 am #16273059 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, make sure you have added language switcher to the correct PC menu, if needed create and add another one. You can do that from WPML > Languages > Menu Language switcher: - https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/ Regards, |
October 10, 2024 at 3:18 pm #16276247 | |
georgiosS-12 |
Hello Dražen. The menu is correctly mapped. You will see this in the responsive display correctly. Regards, |
October 11, 2024 at 6:28 am #16277552 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks, I see there is class added desktop-link-hide, I am not sure from where it is coming, but I think it is not something WPML does. 1) Did you add some custom CSS code, or are not using default WPML language switcher settings? 2) Please check if the issue still happens when using parent Porto theme and WP default theme? Make sure to have a backup. Regards, |
October 22, 2024 at 10:27 pm #16319507 | |
georgiosS-12 |
Hello. I was able to show it with a setting that the theme(Porto) had, but I still have a display problem. Regards, |
October 23, 2024 at 6:35 am #16320042 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello George, make sure you are using WPML language swithcer as described in our docs, and not language switcher from Porto theme: - https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/ - hidden link It should work fine like that, let me know how it goes. Regards, |
October 30, 2024 at 7:48 pm #16349001 | |
georgiosS-12 |
Hello. I can't display only the flag. WEBSITES: ctp.limo, tzanetakis.com Regards, |
October 31, 2024 at 7:07 am #16349802 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello George, that is not possible for dropdown option as you can probably see from language swticher option. You need to select list of languages and select to use only flag, image attached. |
November 1, 2024 at 2:22 pm #16355226 | |
georgiosS-12 |
Hello Dražen. I've tried this setting that you suggest, and any change doesn't take effect. Regards, |
November 5, 2024 at 7:18 am #16364204 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, please share the access details of your website, so I can log in and take a look. I’m enabling a private message for the following reply. We have strict policies regarding privacy and access to your information. Please see: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
- Please backup the site files and database before providing us access.
Thanks, |
November 6, 2024 at 8:51 am #16370184 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks, I have checked and you are using the Porto header builder and Porto language switcher, which you can disable in theme options: hidden link Other than that if you wish to use the WPML official language switcher and adjust it, you will need to add it to your header PHP code via shortcode or to your header, since Porto already uses it own language switcher and WPML can not show it own there. I advise you to use the Elementor option from Porto to build the header builder and there add your WPML shortcode and enable the custom language switcher and it should work and show fine. You can also ask Porto theme support where to add this shortcode to header.php and display it like that. Hope this helps. Regards, |