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.

Our next available supporter will start replying to tickets in about 5.62 hours from now. Thank you for your understanding.

This topic contains 10 replies, has 2 voices.

Last updated by Radu 4 years, 6 months ago.

Assisted by: Radu.

Author Posts
February 20, 2020 at 5:50 pm #5535589

Marina Joseph

Tell us what you are trying to do?

I put a regular anchor link to a French version of a post on an English page (default site language). When I update the page, the href url of that anchor link is changed to the English version of that post. So any user clicking on the link sees the English version, when I want them to see the French translation.

Is there a similar example that we can see?

hidden link

The link in the sentence "Pour plus d’informations sur le Réseau, cliquez ici." This points to the English version of the post, when the url is the French translation in the admin editor. See image.

FrenchURL.JPG
February 24, 2020 at 3:55 am #5551079

Radu

Hey Marina,

I'm glad to see you back!

WPML is made to automatically change the links inside the page. For example, if you create a page in English (with a link on it to another English page) and translate it to French, you won't need to manually change the link on the French page. WPML will handle this for you automatically. I think that the same rule is applied here too.

However, if you want to use a link from a different language, all you have to do is follow the steps presented here https://wpml.org/documentation/getting-started-guide/sticky-links/#linking-to-pages-in-a-different-language. You can give this change a try and tell me how things work this time.

Thanks,
Radu

February 26, 2020 at 5:35 pm #5573397

Marina Joseph

Hi Radu,

I added this to the functions file, but it did keep the link in the original language. I'm am not using the sticky posts plugin and this function works with that plugin. So it must be WPML itself that converts the links. I don't want to install sticky links right now because I will have to learn it. I'm happy to explore that plugin, but right now I just need this link to point where I need it to.

February 27, 2020 at 6:51 pm #5580511

Radu

Hey Marina,

Is there any chance that you could send me a link to the page where are you trying to add this link?

Also, it would be great if you could give me access to the dashboard area too. This way I could have a closer look at this and see how's the link added and what can we do about it.

Thanks,
Radu

March 6, 2020 at 3:13 pm #5636195

Marina Joseph

Hi I'm still having issues with this. Is there any way of fixing this using native WPML?

March 6, 2020 at 3:21 pm #5636233

Radu

Hey Marina,

Sorry for this late reply. I didn't forget about this ticket, it's just that WPML is made to change the link by default, and use the one in current language (as it happens on your website).

I escalated this to the 2nd tier support so I can see if there's any way we can make the link stay in French. I will keep you posted about this as soon as I have an update. One of my colleagues will soon have a look at this.

Thanks,
Radu

March 19, 2020 at 5:31 pm #5722303

Marina Joseph

Is there any update to this?

March 20, 2020 at 1:38 pm #5728181

Radu

Hey Marina,

Sorry for this late reply.

I made some tests on my side and I wasn't able to make the link change as it does on your website. If I add a link from the other language, everything stays as I set.

Can you give me a link to a page where I can still see this issue, please? I'm asking this because I checked this page hidden link but the link that I was able to see the last time is no longer available.

I will try to keep an eye on this ticket so we can sort this out as soon as we can.

Thanks,
Radu

March 25, 2020 at 6:18 pm #5763457

Marina Joseph

Hi Radu,

I had to update that page and removed the link. I just set up a test page on our dev site. The same thing happens. The link is to the french version of the news piece, but it points you to the English version. You can use the same user account I gave you for the live site.

hidden link

March 26, 2020 at 8:14 pm #5773493

Radu

Hey Marina,

Thank you for sending me another link to a page where I can see the issue. I tried to replicate the issue on my testing website but everything works fine for me.

I passed this to my colleagues so they can check this out too. In the meantime, can you try to deactivate all the plugins except for WPML, activate a default theme like Twenty Nineteen, and tell me if you still have this issue, please?
This is the environment that I'm using on my side and I want to make sure that no plugin (or the theme) is causing this issue through some incompatibility.

Thanks,
Radu

March 30, 2020 at 7:52 am #5791703

Radu

Hey Marina,

Can you check again the link from this page, please?
hidden link

As I can see, you're using the code from here:
https://wpml.org/documentation/getting-started-guide/sticky-links/#linking-to-pages-in-a-different-language

in the parkinson-customisations-2.0/functions.php file. Basically, I just added this line:

$blacklist[] = 'le-financement-du-reseau-parkinson-canadien-ouvert-marque-le-lancement-dune-plateforme-de-collaboration-destinee-a-accelerer-la-recherche-sur-la-maladie-de-parkinson-et-a-approfondir-nos-conn';

and now that link is no longer changed. Basically, all you have to do is add a new line for any other link that you don't want to be automatically changed. Just add the slug of the page and that's all.

Thanks,
Radu

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