Skip Navigation

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
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+03:00)

This topic contains 14 replies, has 3 voices.

Last updated by George Botsev 1 year, 7 months ago.

Assisted by: Osama Mersal.

Author Posts
October 27, 2023 at 8:52 am #14676541

George Botsev
WPML Supporter since 02/2014

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Hello!
I am George from the second-tier support.

The ticket was escalated to me and I moved it to our feature requests list.

The functionality that you request - namely to use a shortcode in a menu item - is something that requires additional coding and we cannot provide that for you.

The official way, supported by WPML, to add a language switcher in a menu is to use the page WPML > Languages > Menu language switcher > Add a new language switcher to a menu button.

The fact that you are overriding WordPress to execute shortcodes in a menu item is - let's say it - not entirely a proper and documented way of doing it, as it was not designed to be done in this way.

Yes, I can see that in the past you have been offered a solution, however, that said solution seems to utilize a 3rd party plugin - “Shortcode in Menus” plugin available for free at: https://wordpress.org/plugins/shortcode-in-menus/, and in manner of fact, if I use that plugin, and if I use their custom element "Shortcode", I can add a language switcher with a shortcode to the menu and you can see my results in hidden link. Of course, you have to manually translate the menu item of the type "shortcode" so that it works properly.

I hope that this helps you resolve the issue that you have.

The topic ‘[Feature Request] Language switcher shortcode does not work in menu’ is closed to new replies.