Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unable to add the WPML language switcher to the main menu after updating the plugin. The previously working CSS snippet and widget placement methods were not functioning post-update.
Solution:
1. We advised the client to ensure that the menu is translated into all languages and to re-save the menu settings in each language. Then, to delete and re-add the language switcher in WPML -> Languages.
2. We accessed the client's site and fixed a small issue in the languages table in the database, which allowed us to successfully add the language switcher to the Main Right menu.
3. For adding the language switcher to the top right section, since there was no menu, we recommended using a widget or a shortcode.
4. We added the widget for the client, which can now be edited via the WPML 'Widget language switcher' section.
5. Regarding the inability to drag and drop widgets due to a WordPress update (not related to WPML), we instructed the client on how to click on widgets in the left column and assign them to the desired section.

If this solution does not resolve your issue or seems outdated, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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: 

This topic contains 14 replies, has 2 voices.

Last updated by Carlos Rojas 7 months ago.

Assisted by: Carlos Rojas.

Author Posts
November 4, 2024 at 9:43 am #16359655

Dimitris Chatzimanolis

Background of the issue:
I am trying to add WPML language switcher at my main menu on the site hidden link. Before updating the plugin to the latest version, the following CSS snippet worked normally: /*WPML LANGUAGE SWITCHER*/ .head-right #lang_sel li, .head-right #lang_sel_list li, .head-right #lang_sel_click li { display:inline-block; } .head-right #lang_sel a.lang_sel_sel:after, .head-right #lang_sel_list a.lang_sel_sel:after, .head-right #lang_sel_click a.lang_sel_sel:after{ display:none; } #lang_sel_list ul{ border:none; } .head-right #lang_sel a.lang_sel_sel, .head-right #lang_sel_list a.lang_sel_sel, .head-right #lang_sel_click a.lang_sel_sel{ padding:0; margin:0 2px; } .head-right #lang_sel img.iclflag, .head-right #lang_sel_list img.iclflag, .head-right #lang_sel_click img.iclflag{ top:0; width:auto; } #lang_sel_list ul a.lang_sel_other, #lang_sel li ul a:link, #lang_sel_list ul a.lang_sel_other:visited { background:transparent; } .page-id-127 .head-right .widget { margin-right: 7px; } .page-id-610 .head-right .widget { margin-right: 7px; } #lang_sel_list a{ background:none!important; } .head-right #lang_sel_list img.iclflag {padding-right:5px;} /*END OF WPML LANGUAGE SWITCHER*/

Symptoms:
Cannot add language switcher to menu after updating the plugin to the latest version.

Questions:
How can I add the WPML language switcher to my main menu after the update?

November 4, 2024 at 12:27 pm #16360935

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello,
Thank you for contacting us

To solve this issue you must start by double-checking that the menu is translated to all languages. I recommend to re-save the menu in all languages and then delete and add the language switcher again in WPML -> Languages

Please let me know if the issue persists or disappeared.

Regards,
Carlos

November 4, 2024 at 12:48 pm #16361051

Dimitris Chatzimanolis

Hello Carlos,

I re-saved all of my menus at both languages (english & greek) but the issue still takes place. While clicking on "+ Add a new language switcher to a menu", it doesn't load correctly on my end and I get a white page. Created link on browser URL is the below one:

https://www.bvpotokaki.gr/wp-admin/admin.php?wpml-ls-refresh-on-browser-back-button=no&languages_order%5B%5D=en&languages_order%5B%5D=el&link_empty=0&copy_parameters=&additional_css=&statics%5Bfooter%5D%5Btemplate%5D=wpml-legacy-horizontal-list&statics%5Bfooter%5D%5Bdisplay_flags%5D=1&statics%5Bfooter%5D%5Binclude_flag_width%5D=18&statics%5Bfooter%5D%5Binclude_flag_height%5D=12&statics%5Bfooter%5D%5Bdisplay_names_in_current_lang%5D=1&statics%5Bfooter%5D%5Bdisplay_link_for_current_lang%5D=1&wpml-ls-static-footer-colorpicker-preset=&statics%5Bfooter%5D%5Bbackground_normal%5D=%23eeeeee&statics%5Bfooter%5D%5Bborder_normal%5D=%23cdcdcd&statics%5Bfooter%5D%5Bfont_current_normal%5D=%23444444&statics%5Bfooter%5D%5Bfont_current_hover%5D=%23000000&statics%5Bfooter%5D%5Bbackground_current_normal%5D=%23ffffff&statics%5Bfooter%5D%5Bbackground_current_hover%5D=%23eeeeee&statics%5Bfooter%5D%5Bfont_other_normal%5D=%23444444&statics%5Bfooter%5D%5Bfont_other_hover%5D=%23000000&statics%5Bfooter%5D%5Bbackground_other_normal%5D=%23ffffff&statics%5Bfooter%5D%5Bbackground_other_hover%5D=%23eeeeee&statics%5Bpost_translations%5D%5Btemplate%5D=wpml-legacy-post-translations&statics%5Bpost_translations%5D%5Binclude_flag_width%5D=18&statics%5Bpost_translations%5D%5Binclude_flag_height%5D=12&statics%5Bpost_translations%5D%5Bdisplay_names_in_current_lang%5D=1&statics%5Bpost_translations%5D%5Bavailability_text%5D=This+post+is+also+available+in%3A+%25s&statics%5Bshortcode_actions%5D%5Bshow%5D=1&statics%5Bshortcode_actions%5D%5Btemplate%5D=wpml-legacy-horizontal-list&statics%5Bshortcode_actions%5D%5Bdisplay_flags%5D=1&statics%5Bshortcode_actions%5D%5Binclude_flag_width%5D=18&statics%5Bshortcode_actions%5D%5Binclude_flag_height%5D=12&statics%5Bshortcode_actions%5D%5Bdisplay_names_in_current_lang%5D=1&statics%5Bshortcode_actions%5D%5Bdisplay_link_for_current_lang%5D=1&wpml-ls-in-shortcode-actions-colorpicker-preset=&statics%5Bshortcode_actions%5D%5Bbackground_normal%5D=%23eeeeee&statics%5Bshortcode_actions%5D%5Bborder_normal%5D=%23cdcdcd&statics%5Bshortcode_actions%5D%5Bfont_current_normal%5D=%23444444&statics%5Bshortcode_actions%5D%5Bfont_current_hover%5D=%23000000&statics%5Bshortcode_actions%5D%5Bbackground_current_normal%5D=%23ffffff&statics%5Bshortcode_actions%5D%5Bbackground_current_hover%5D=%23eeeeee&statics%5Bshortcode_actions%5D%5Bfont_other_normal%5D=%23444444&statics%5Bshortcode_actions%5D%5Bfont_other_hover%5D=%23000000&statics%5Bshortcode_actions%5D%5Bbackground_other_normal%5D=%23ffffff&statics%5Bshortcode_actions%5D%5Bbackground_other_hover%5D=%23eeeeee

November 4, 2024 at 12:53 pm #16361094

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Thank you for your feedback.

I would like to take a closer look at the issue. I have set your next message private where you will find the fields to share the access credentials securely.

Please don't forget to create a full backup of the site before sharing the access credentials.

November 4, 2024 at 1:38 pm #16361306

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Thank you for sharing the access credentials.

I fixed a small issue in the languages table in the database and then I was able to add a language switcher in the Main Right menu. Can you confirm that the issue is solved?

November 4, 2024 at 1:56 pm #16361395

Dimitris Chatzimanolis

Indeed now the language switcher appears normally in the Main Right Menu.

However can you make it appear on the top right header area (both flags, Greek and English) as it was appearing before the WPML update via the following CSS?

/*WPML LANGUAGE SWITCHER*/

.head-right #lang_sel li, .head-right #lang_sel_list li, .head-right #lang_sel_click li { display:inline-block; } .head-right #lang_sel a.lang_sel_sel:after, .head-right #lang_sel_list a.lang_sel_sel:after, .head-right #lang_sel_click a.lang_sel_sel:after{ display:none; } #lang_sel_list ul{ border:none; } .head-right #lang_sel a.lang_sel_sel, .head-right #lang_sel_list a.lang_sel_sel, .head-right #lang_sel_click a.lang_sel_sel{ padding:0; margin:0 2px; } .head-right #lang_sel img.iclflag, .head-right #lang_sel_list img.iclflag, .head-right #lang_sel_click img.iclflag{ top:0; width:auto; }

#lang_sel_list ul a.lang_sel_other, #lang_sel li ul a:link, #lang_sel_list ul a.lang_sel_other:visited
{
background:transparent;
}

.page-id-127 .head-right .widget {
margin-right: 7px;
}

.page-id-610 .head-right .widget {
margin-right: 7px;
}

#lang_sel_list a{ background:none!important; }

.head-right #lang_sel_list img.iclflag {padding-right:5px;}

/*END OF WPML LANGUAGE SWITCHER*/

November 4, 2024 at 2:08 pm #16361485

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi,
Could you tell me how you added the language switcher in the top right section in the first place?

I can't see any menu up there, nor a menu section. If there is no menu, then you will probably have to add the language switcher via a widget or a shortcode.

November 4, 2024 at 2:26 pm #16361544

Dimitris Chatzimanolis

I think I had added it in the past via Appearance -> Widgets -> Language Switcher at Header Right.

Check my attached screenshot.

But after latest update, I am also not able to drag and drop any widgets.

Widgets-Nikos-Studios.jpg
November 4, 2024 at 3:11 pm #16361827

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,

I added the widget for you and you can edit it at hidden link -> 'Widget language switcher' section

November 4, 2024 at 3:24 pm #16361867

Dimitris Chatzimanolis

Thank you for the support so far, the switcher seems fine now.

Are you also maybe aware why I can't see the widgets after the latest WPML update?

hidden link

Check my attached screenshot to see what I had before.

bv-potokaki-online-reservation.jpg
November 4, 2024 at 3:28 pm #16361901

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

I'm happy to hear that the issue is solved 🙂

The widgets are working correctly but with this version of WordPress (not WPML) you must click on the widgets in the left column and assign the section. With this latest version you can't drag and drop the widgets.

November 4, 2024 at 3:42 pm #16361961

Dimitris Chatzimanolis

What do you mean exactly by "assign"? When I click at any of the widgets in the left column of Available Widgets, I am not able to do anything with them.

In addition, do you see on your end the "contact info" and "follow us on FB" widgets at the right area that I showed to you above at the hidden link page?

November 5, 2024 at 8:35 am #16364763

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

1.- In the attached image you will find a screenshot taken when you click on one of the available widgets -see attached image- and as you can see, there is the option to assign the widget to the desired widget area.

2.- No, I can't see the widgets in the right column of the hidden link page

FireShot Capture 032 - Widgets ‹ Nikos Studios — WordPress - www.bvpotokaki.gr.png
November 5, 2024 at 9:19 am #16364885

Dimitris Chatzimanolis

Hello,

1. It was finally a temporary cache issue on my end and I wasn't able to click on any widget. I finally achieved to assign the custom HTML widget to the pages area and create it again.

2. I suppose that you can see the above widget now right?

3. On Arrival and Departure fields of the Online Reservation form, do you see the small calendar icon at the fields or the <i class="fa fa-calendar"> which I get on my end? Something seems that influenced that after the last update.

Online-Reservation-2.jpg
Online-Reservation-1.jpg
November 5, 2024 at 9:24 am #16364955

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

1.- Great 🙂

2.- Yes, I can see the 'Contact information' widget now

3.- I can't say what could be causing this problem. Keep in mind that this is an issue on the site's default language where WPML makes no changes at all.