Skip Navigation

Open

Reported for: WPML Multilingual CMS 4.5.5

Topic Tags: How to translate

Overview of the issue

Since WPML 4.5, even if you haven’t translated your site’s menu, WPML renders it on secondary languages. This new feature works great, however, if your menu contains sub-items, the drop-down will look broken.

Workaround

As a workaround you can simply translate your menu or:

  1. Make a full backup of your site.
  2. Edit the /sitepress-multilingual-cms/inc/wp-nav-menus/TranslateMenu.php file.
  3. Look for line 54.
  4. Change:
    if ( $key !== 'menu_order' ) {
    
  5. With:
    if ( !in_array($key, ['menu_order', 'post_type', 'ID']) ) {
    

2 Responses to “Menus with sub-items look broken in secondary languages”

  1. Could you please clarify what this work around does?

    I would like a way to disable this feature completely. ie – if I have not actually translated the Menu then the default language menu is shown. (as it used to in prior WPML versions)

    This new feature has completely broken my site as I have a Mega Menu.
    After updating WPML my menu on translated pages is multiple rows of text links. With over 100 items in the Mega menu – translating it for 7 languages is not feasible.

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>