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 thread is resolved. Here is a description of the problem and solution.

Problem: Anchor links in the menu are redirecting to default language version of the site.

Solution: If these links have been aded in the menu as custom menu elements with a link to this section, you should edit the menu in your secondary language and edit their link so hey include the translated url.

For example if your original menu element links to "/#tm-bottom-b", and you're editting your French menu, you should update its url to "/fr/#tm-bottom-b".

0% of people find this useful.

This topic contains 3 replies, has 3 voices.

Last updated by sladjanJ 2 years, 7 months ago.

Assigned support staff: Bernat Torras.

Author Posts
February 26, 2017 at 6:33 pm #1217566

Remco

I am trying to: get mainmenu fully functional

URL of (my) website where problem appears: hidden link

I expected to see: A main-menu (anchors) working the same everywhere, which it logically does not. But how do I get it to work the way I want?

Steps to duplicate the issue: go to the website in English. On the homepage you can click in mainmenu i.e. on spinners and it will go to spinners on that page (menu set /#tm-bottom-b). Now go to i.e. Customer Service (topmenu left) en again click Spinners. It will go back to the frontpage en to the section Spinners. GREAT!

Now change the site to any other language then English. Go to the homepage. Click Spinners. You'll go to the section Spinners on the homepage of the selected language. Now go to one of the menuitems topmenu left again. Click a page and there select Spinners again. You will now go to the section Spinners on the homepage of the English section. Which should not be the case. It should go to Spinners on te homepage of the selected language. Fix /../#tm-bottom-b didn't work. Is there a way to make this work smoothly, cause it really is the structure I want to work with.

Hope you can help, best regards,

Remco

February 27, 2017 at 9:04 am #1217764

Bernat Torras

Hi Remco,

Thanks for contacting support, I'll do my best to help you with this! 🙂

I understand that these menu items that redirect you to certain section of your homepage have been aded in the menu as custom menu elements with a link to this section, right?

If so, could you try to edit the menu in your secondary language and edit their link so hey include the translated url?

for example if your original menu element links to "/#tm-bottom-b", and you're editting your French menu, you should update its url to "/fr/#tm-bottom-b".

Could you try it and tell us if its working fine?

Thanks,
Bernat

March 1, 2017 at 3:11 pm #1220020

Remco

YES! Easy was it?! Could have think of that myself. But I didnt. To Lazy probably 🙂 THANKS!!! LOVE IT! Love the plugin, love your support. Thanks a lot, makes my website look and work very pro.

Have a nice day!

best regards,

Remco

April 5, 2019 at 5:51 pm #3546225

sladjanJ

Hi there, I have the exact same problem but the solution doesn't work for me. I think that is because I don't have a separated folder for secondary language ( my url is not site.com/fr, it's site.com/?lang=fr).
Can you help please?

Thanks!