Skip Navigation

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

Problem:
If you're experiencing an issue where the overlay menu for the second language is not visible on the mobile version of your site, while it works correctly for the primary language, the problem may be related to the theme you are using.

Solution:
First, ensure that your theme is compatible with WPML. You can check the theme's certification status on the WPML's list of compatible themes.

If the theme is not certified, you might encounter issues with multilingual functionality. In the theme file

/wp-content/themes/marquez/block-parts/overlay_navigation.php

, the theme author uses a custom function to display the navigation menu. We recommend replacing this custom function with the standard WordPress function

wp_nav_menu()

to ensure compatibility with WPML. Here is an example of how you can adjust the code:

<div class="column width-12">
	<nav class="overlay-navigation nav-block pull-left clear-float-on-mobile">
		<span class="menu-title"><?php echo esc_html($thememountain_overlay_secondary_menu_title); ?></span>
		<?php
			wp_nav_menu( array(
				'theme_location' => 'overlay_menu'
			) );
		?>
	</nav>
</div>

For more information on how to use

wp_nav_menu()

, please refer to the WordPress Developer Documentation.

Please note that custom code assistance is beyond the scope of WPML support. If you need help with custom code, consider contacting one of our certified partners.

Keep in mind that the theme's last update was in 2017, which is quite outdated. We recommend using a theme from the list of compatible themes to ensure proper content translation on your site.

If the solution provided here is not relevant to your case, either because it's outdated or not applicable, we highly recommend checking related known issues on the WPML Known Issues page, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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.

This topic contains 7 replies, has 3 voices.

Last updated by Long Nguyen 4 months, 3 weeks ago.

Assisted by: Long Nguyen.

Author Posts
April 30, 2024 at 12:46 pm #15581331

attilioC-2

In the mobile verision you do not see the Overlay Menu for the second language, you only see it for the princiaple language.
I have configured the overlay menu positions for both languages

April 30, 2024 at 2:12 pm #15581688

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hello,

before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

It seems that the overlay issue originates from your theme. Could you please provide us with more details about how this was created? With more information, we can offer specific advice on how to address it. Unfortunately, with the current details, it's difficult to provide a comprehensive answer.

Additionally, it appears that the theme you are using is not certified by WPML. This means it may not adhere to multilingual standards that are necessary for proper translation. You can check the theme's certification status here: https://wpml.org/theme/?wpv_view_count=119967&wpv-theme-category=0&wpv_post_search=marquez&wpv-wpcf-recommendation-flag=&wpv_filter_submit=Search.

Best regards
Marcel

April 30, 2024 at 2:45 pm #15581786

attilioC-2

Hi Marcel,
the theme I am using Maquez has not been updated anymore and I have redone it practically from scratch.
So from what I can tell you the template compares well, it handled well all the translations of the content of both pages and posts and the same for the management of the menus, except in the mobile version and only for the second language Italian, the menu is not printed. That is, it is opened with a closing icon, but no html code is generated This is the result <div class="column width-12"></div>.
As you can see, it is empty.
Now I wanted to find out if there was some special WPML function that could block the responsive menu from being displayed on the second language. The strange thing is the menu in the mobile version for the main language English is displayed correctly

Can you guide me with a debug system to see where the problem might be?

Best Regards,
Attilio

May 2, 2024 at 4:13 am #15585328

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Can you please try to replicate the issue on a clean installation of WordPress? You can access the admin area with this link
hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install Marquez theme.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Looking forward to your reply.
Thanks

May 2, 2024 at 7:47 am #15585829

attilioC-2

I installed Marquez and created a menu with or just one item.
The proplematica looks the same as the online site, only the menu for the Italian of the mobile version is not displayed.

Looking forward to your reply.
Thanks

May 2, 2024 at 8:43 am #15586181

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

In the theme file /wp-content/themes/marquez/block-parts/overlay_nagivation.php, around lines 19-40, you can see the theme author is using their custom function to display the navigation menu

<div class="column width-12">
	<?php
	if(!empty($thememountain_overlay_secondary_menu_title = TM_NavMenuServices::tm_nav_menu_title('overlay_menu'))) :
		?>
	<nav class="overlay-navigation nav-block pull-left clear-float-on-mobile">
		<span class="menu-title"><?php echo esc_html($thememountain_overlay_secondary_menu_title); ?></span>
		<?php
		TM_NavMenuServices::tm_nav_menu('overlay_menu');
		?>
	</nav>
	<?php endif; ?>
	<?php
	if(!empty($thememountain_overlay_secondary_menu_title = TM_NavMenuServices::tm_nav_menu_title('overlay_secondary_menu'))) :
		?>
	<nav class="overlay-navigation nav-block pull-left clear-float-on-mobile">
		<span class="menu-title"><?php echo esc_html($thememountain_overlay_secondary_menu_title); ?></span>
		<?php
		TM_NavMenuServices::tm_nav_menu('overlay_secondary_menu');
		?>
	</nav>
	<?php endif; ?>
</div>

I adjust the code and use the WordPress function to show the navigation menu then the translation menu displayed in the overlay menu as well.

<div class="column width-12">
	<nav class="overlay-navigation nav-block pull-left clear-float-on-mobile">
		<span class="menu-title"><?php echo esc_html($thememountain_overlay_secondary_menu_title); ?></span>
		<?php
			wp_nav_menu( array(
				'theme_location' => 'overlay_menu'
			) );
		?>
	</nav>
</div>

Refer documentation https://developer.wordpress.org/reference/functions/wp_nav_menu/

Note: I would like to inform you that helping you with custom code, is out of the scope of WPML, but I help you by pointing you to the source of the problem you are having.
If you are not able to accomplish this, I would recommend you contact one of our certified partners who will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/

Also, the last update of the theme was in 2017 which is a very old version. I recommend you use a theme in the list of compatible themes to translate content on your site.
https://wpml.org/theme/

Looking forward to your reply.
Thanks

May 2, 2024 at 9:24 am #15586366

attilioC-2

I made the changes to the code as indicated and now the responsive menu works correctly.

I thank you for your help

May 3, 2024 at 1:27 am #15589369

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Feel free to contact us again if you have any questions.

Thanks and have a good day.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.