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/wpml-not-rendering-code-on-translated-version/
Tagged: Exception
This topic contains 2 replies, has 0 voices.
Last updated by Otto 1 month, 1 week ago.
Assisted by: Otto.
Author | Posts |
---|---|
April 24, 2025 at 7:57 pm #16966164 | |
alexJ-21 |
I managed to fix the HTML <span> tags by creating a custom translated menu for english, thanks! But I still can't find the reason why the mobile menu code doesn't work since it worked in the sandbox. I downloaded the layouts from the site so the configuration is the same. Is there some bug or something you can see causing it? |
April 24, 2025 at 8:04 pm #16966185 | |
![]() Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello again 🙂 Can you please elaborate a bit more on the problem? How can I see it? What's the expected behaviour of the mobile menu? As far as I can see in the sandbox site, the menu behaves the same way in both languages. But on your site, it doesn't? Did you try creating a custom translated menu for the mobile English version? Best Regards, |
April 24, 2025 at 8:10 pm #16966188 | |
alexJ-21 |
Hi, The expected look is the one on my swedish site (main language), left aligned and + icons to expand submenus but it looks different in english. The code for those things are located in a code module in the header theme builder layout. I'll send images too, but in the sandbox it works in both languages for some reason but I can't find what the difference is. |
April 24, 2025 at 8:38 pm #16966265 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. The information you will enter is private which means only you and I can see and have access to it. **IMPORTANT** Best Regards, |
April 25, 2025 at 2:46 pm #16969199 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Thanks. Can you provide the steps to reach the code you are using for the mobile menu. I can't find it 🙁 Also, please make sure you followed these steps to translate the theme builder layout: Best Regards, |
April 25, 2025 at 3:04 pm #16969315 | |
alexJ-21 |
You will find it under Divi > theme builder > edit global header > click the purple ... icon at the bottom center to open the menu. Then at the left down corner you will se a icon left to the search icon with 3 shapes in it. Click that and you will se the wireframe version of the layout, then you will see a code module you can edit. |
April 25, 2025 at 4:28 pm #16969461 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Thanks. The reason the mobile submenu toggle isn’t working on the English version of the site is that the necessary <span class="menu-closed"></span> elements (which act as toggles) are missing in that version's menu HTML. In the Swedish version, these spans are either manually added or dynamically inserted via JavaScript targeting a specific menu container (#dd-menu-mobile). However, in the English version, the menu lives inside a different container (e.g., #mobile_menu2), so the JavaScript never finds it and doesn't inject the toggles. To resolve this, you have two options: This should make the toggle icons appear and the submenu functionality work on both language versions. Best Regards, |
April 25, 2025 at 5:32 pm #16969586 | |
alexJ-21 |
Thanks, since it worked in the sandbox when I uploaded the header I tried downloading that header and replacing it on the staging site. It resulted in the mobile menu being kind of correct, left aligned and right styling but no + icons. Then I tried uploading the same layout to the real site and then all of a sudden it works on both languages like in the sandbox. Thankfully it works now but it has to be some kind of bug somewhere that causes this. It seems to be very random but thanks for your help! |
April 25, 2025 at 5:35 pm #16969590 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Great, I am happy to hear that it works now. I am closing this ticket. Please open a new one if you need. Best Regards, |