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 is split from https://wpml.org/forums/topic/i-cant-upgrade-my-account/
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - |
Supporter timezone: Asia/Jerusalem (GMT+02:00)
Tagged: Custom Work
This topic contains 6 replies, has 0 voices.
Last updated by Itamar 2 days, 3 hours ago.
Assisted by: Itamar.
Author | Posts |
---|---|
January 19, 2025 at 12:04 pm #16610387 | |
ukuS |
Hi I managed to subscribe but now the issue is that the language switcher (flags on the top right corner of the site) are not leading to the pages as before. Please check this link hidden link and if to then click on the three flags (Finnish, Latvian, Lithuanian) on the top right corner you will see that it doesn’t work. I don’t know what exactly happened as it was working before upgrading to paid version of WPML. I have added the correct links where these flag buttons should lead to in the Customize - Settings - Custom code section. Could you please help with this? Thanks |
January 19, 2025 at 12:33 pm #16610409 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, I can see this problem on your site. For the Finnish language, I get this message:
Please see the attached screenshot. If you have a folder named /fi/ in your WordPress installation, this might be the reason for this. You should delete this folder because this might interfere with WPML's Language URL format of Languages Directories. If it does not help and you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply. |
January 20, 2025 at 12:20 pm #16613307 | |
ukuS |
Hi Itamar Let me explain in more detail. So we have previously added this code to our Customize - Settings - Custom code section: }); There you see those links where each flag should direct to. It doesn't work anymore. Do you know can we solve this is with the flags? If we don't have those translations in these languages but want those flags to direct to our partners external websites, what should we do? NB. I haven't yet created a back-up of anything. Do you need to log in to our WordPress to check the possible solutions? Thank you |
January 20, 2025 at 3:13 pm #16614293 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, Uku. Thanks for adding this important information. If the Finnish, Latvian, and Lithuanian flags are supposed to link to external sites, then you should remove them from WPML. In other words, they should not be added as secondary languages. This can be done in WPML -> Languages -> Site Languages, and click the Add/Remove Languages button. Then, you need to create a custom Language Switcher by following the instructions in our guide here. The above guide only gives some simple examples. You will need your custom Language Switcher to combine Estonian and English (the languages added by WPML) and the external links you need to the Finnish, Latvian, and Lithuanian websites. If you have further questions or doubts about what we explain in the above guide, we will happily answer them. If something is not working in the custom Language Switcher you created, we will be glad to take a look and say what might be the problem. Otherwise, if you need further help with what you are trying to achieve, I would suggest you consider contacting one of our certified partners from this link: Before doing so, please have a look also here: With our contractors, you might get the custom assistance you need to get on with your project. Regards, |
January 21, 2025 at 10:12 am #16617581 | |
ukuS |
Hello Thanks |
January 22, 2025 at 3:22 pm #16623934 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, Uku. As I mentioned, you will need custom work to achieve this, which is out of the scope of our support forum. However, I asked our second-tier supporters if they could provide a sample code for your needs. I'll update you here once I have their reply. I appreciate your patience. |
January 22, 2025 at 4:54 pm #16624449 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, Here is a code you can add to the functions.php file of your theme that is supposed to help you with what you are trying to achieve. function custom_language_switcher_links( $languages ) { // Add the first external link $languages['external_1'] = array( 'url' => '<em><u>hidden link</u></em>', 'native_name' => 'Suomi', 'translated_name' => 'Finnish', 'country_flag_url' => 'https://cdn.wpml.org/wp-content/plugins/sitepress-multilingual-cms/res/flags/fi.svg', 'language_code' => 'fi', 'code' => 'fi' ); // Add a second external link $languages['external_2'] = array( 'url' => '<em><u>hidden link</u></em>', 'native_name' => 'Latviešu', 'translated_name' => 'Latvian', 'country_flag_url' => 'https://cdn.wpml.org/wp-content/plugins/sitepress-multilingual-cms/res/flags/lv.svg', 'language_code' => 'lv', 'code' => 'lv' ); // Add a third external link $languages['external_3'] = array( 'url' => '<em><u>hidden link</u></em>', 'native_name' => 'Lietuvių', 'translated_name' => 'Lithuanian', 'country_flag_url' => 'https://cdn.wpml.org/wp-content/plugins/sitepress-multilingual-cms/res/flags/lt.svg', 'language_code' => 'lt', 'code' => 'lt' ); return $languages; } add_filter( 'icl_ls_languages', 'custom_language_switcher_links' );
|