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 5 replies, has 2 voices.

Last updated by Bobby 1 month, 1 week ago.

Assigned support staff: Bobby.

Author Posts
September 5, 2019 at 6:07 pm

carlosG-65

Hello,

When I mouse over the language switcher I get a title tag under the language.

If I use CSS pointer events, the link won't work.

I am attaching a screenshot.

September 5, 2019 at 6:18 pm
September 5, 2019 at 6:39 pm #4521615

carlosG-65

Hello, the language switcher in the homepage is a widget and the language switcher in the shop page is a menu with just those elements. I couldn't do it any other way.

Both, were created with the switcher from WPML>Languages.

September 5, 2019 at 6:41 pm #4521621

carlosG-65

The title appears with the menu switcher only. But I can't use the widget switcher on the elementor template. It doesn't display.

September 5, 2019 at 7:18 pm #4521791

Bobby
Supporter

Languages: English (English )

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

Thank you for the additional information.

The reason EN and ES shows on hover is because this menu is created in elementor and is created with a title attribute

<a title=EN 

WPML itself does not add the title attribute, for example if you review a footer language switcher there is no title attribute

review the screenshots i shared with you.

you cannot effectively remove title attributes with CSS as when disabling CSS pointer events its renders the link useless

relative topic to review :

https://stackoverflow.com/questions/15364063/is-it-possible-to-hide-the-title-from-a-link-with-css

September 5, 2019 at 7:41 pm #4521903

carlosG-65

It's interesting, becaue this issue only happens with the WPML switcher. All the other navigation menus used by elementor don't show any title tag like this.

So apparently I have to do it through JS. Do you know which files do I need to modify? And which code to use?

Thank you,

September 6, 2019 at 7:15 am #4523579

Bobby
Supporter

Languages: English (English )

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

Hello,

This is expected, the reason this is happening with the language switchers added to your menu is because the menu is controlled by your theme "Avada".

where as the language switcher added as a widget remains controlled by WPML's code.

Avada adds a title attribute to the menu language switchers.

Unfortunately we cannot provide custom work such as JS to remove the title attribute but since i can now confirm that the title attribute is added by Avada, you could reach out to your theme support as they know their code best to let you know how you could remove this title attribute

Another option from our side could be to create a custom language switcher that is entirely controlled by you, to do this please review the following documentation

-> https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/

-> https://wpml.org/documentation/getting-started-guide/language-setup/designing-custom-language-switchers-using-template-files/

my recommendation is to first contact Avada as they do know their code best and they should be able to tell you how to remove the title attribute

The topic ‘[Closed] Hide title tag when mouse over language switcher’ is closed to new replies.