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.

This topic contains 3 replies, has 0 voices.

Last updated by Bobby 1 week, 4 days ago.

Assisted by: Bobby.

Author Posts
March 19, 2026 at 5:21 pm #17912108

lucaS-38

Hi,

I am currently experiencing an issue with the WPML language switcher block used inside a navigation menu.

The setup is similar to several other projects where I use GeneratePress and GenerateBlocks, and where the language switcher behaves correctly. However, in this specific case, the dropdown is rendered as expanded on page load, with aria-expanded="true" already set in the initial HTML.

This only occurs when the switcher is configured to open on click. When set to open on hover, it initializes correctly in a collapsed state.

I have verified that:

I am running the latest version of WordPress

I am running the latest version of WPML and its related components

There are no obvious JavaScript errors in the console

Could you please advise whether there is a configuration or known compatibility issue that could cause the dropdown to initialize as expanded?

Thanks

March 21, 2026 at 3:34 am #17915457

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

At the moment there are no known issues with Generatepress and WPML.

The two work well with each other based on our latest results.
https://wpml.org/theme/generatepress/

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

March 24, 2026 at 4:52 am #17920084

lucaS-38

Hi Bobby,

I was able to resolve the issue by deactivating and then reactivating the WPML plugin.

After doing that, the language switcher behaved correctly and aria-expanded="true" is no longer set on page load.

Weird, as I have never encountered such issue before in many years of using WPML.

But everything is working properly now, so we can close this case.

Thanks for your support.

March 24, 2026 at 7:53 pm #17923969

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Glad to hear it's resolved and yes indeed interesting solution, most likely it cleared the caching.