Skip Navigation

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

Problem:
Whenever I add custom css code to WPML->languages->language switcher there will be a mixup in the menu that is displayed

Solution:
- Go to "WPML > WP Menus Sync"
- Click on "Sync"
- Select on elements and click "Apply changes"
- If you have some custom links you will have a link at the bottom of the page that will redirects you to "String Translation" to translate them

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/translating-menus/#option-3-automatic-menus-sync-by-wpml

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 6 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 6 months ago.

Assisted by: Nicolas V..

Author Posts
November 15, 2023 at 10:58 am #14807365

janH-80

Hello

Whenever I add custom css code to WPML->languages->language switcher there will be a mixup in the menu that is displayed. Event if I add a empty css tag to the custom field.

The menu affected is the menu with the id 22. As soon as I add mentioned css code this menu is "lost" and instead a menu with all the pages is displayed.

Thank you for having a look.

Kind regards,
Jan

November 15, 2023 at 9:23 pm #14820735

janH-80

To further clarify:

The site where it happens is: hidden link

This is how the menu is displayed correctly: hidden link

This is the menu that is displayed after adding any (random) CSS code: hidden link

Thanks,
Jan

November 15, 2023 at 9:37 pm #14820753

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum. Let's start by meeting WPML's minimum requirements. I've noticed your website has a low PHP memory allocation (40M). The minimum requirement for WPML is 128M but we recommend 256M:
- Access your server via FTP and open wp-config.php (in your WordPress root directory).
- Insert those lines just before /* That's all, stop editing! Happy blogging. */

/* Memory Limit */
define( 'WP_MEMORY_LIMIT', '256M' );

More info: https://wpml.org/home/minimum-requirements/

---

Once the memory is increased, please try our option that synchronize menus between language. For this follow the third option on this page: https://wpml.org/documentation/getting-started-guide/translating-menus/#option-3-automatic-menus-sync-by-wpml

In short:
- Go to "WPML > WP Menus Sync"
- Click on "Sync"
- Select on elements and click "Apply changes"
- If you have some custom links you will have a link at the bottom of the page that will redirects you to "String Translation" to translate them

November 20, 2023 at 2:38 pm #14878343

janH-80

Hello Nicolas

Thank you for your feedback. I did follow your recommended steps. It did not produce the desired reult. I will have to do some more tests though. Will get back.
Thank you.
Jan

November 20, 2023 at 9:50 pm #14880941

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi Jan,

I will leave this ticket open waiting for your feedback.

November 27, 2023 at 7:40 am #14926845

janH-80

Thank you Nicolas. I'm sorry for the delay.

November 28, 2023 at 11:19 am #14938067

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi Jan,

No problem. This ticket will remain open for 14 days. Let me know how it goes.