Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by Andreas 6 days, 4 hours ago.

Assisted by: Shekhar Bhandari.

Author Posts
August 28, 2025 at 5:44 am

Andreas

Background of the issue:
I am trying to manage a site with 23 languages using WPML. I've noticed that sometimes the menu breaks 'on its own' due to some background activity. I applied a temporary fix by deactivating some of WPML's hooks, but I'm unsure of the unintended consequences. Here is the temporary fix I applied to the main site: add_action('init', function() { global $wpml_nav_menu; if (isset($wpml_nav_menu->nav_menu_actions)) { remove_action('wp_create_nav_menu', array($wpml_nav_menu->nav_menu_actions, 'wp_update_nav_menu'), 10); remove_action('wp_update_nav_menu', array($wpml_nav_menu->nav_menu_actions, 'wp_update_nav_menu'), 10); remove_action('wp_update_nav_menu_item', array($wpml_nav_menu->nav_menu_actions, 'wp_update_nav_menu_item'), 10); } }, 20);

Symptoms:
Some translated submenu entries are being assigned to the original language menu entry, causing child menu entries to appear as main entries because the parent cannot be located. This issue happens 'on its own' even after running a script to fix it.

Questions:
How can I fix the menu assignment issue without interfering with how the plugin works?

August 28, 2025 at 6:14 am