[Resolved] on the frontend the button shows only link of ENGlish
This thread is resolved. Here is a description of the problem and solution.
Problem: The client has an issue where a button on the English version of their site, which should link to the German version, only shows the English URL.
Solution: We recommend the following steps:
- Add the following code to the theme's functions.php file:
Adjust the $blacklist array as per the slug(s) of your pages/posts.
- If the issue persists on the said page, it may be due to corrupted entries. We advise deleting the page (including from Trash) and recreating it, along with its translations.
Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues at WPML known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket for further assistance: WPML support forum.
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.
we have a problem with url . we have a button on English Version and this button has a link to German Version but on the frontend the button shows only link of ENGlish hidden link
the button "deutschsprachige Downloads"
I tried to reproduce the issue on my sandbox site (fresh installation), but can't reproduce it. And here it seems to work just fine:
- hidden link
- hidden link
I tried 2 different approaches for the link:
- Used full qualified link like hidden link
- and used a relative link /de/de-test-wpml/
and both seems to work fine.
Can you use this link to login to the sandbox site hidden link and try reproducing the issue please? So we can ensure if I haven't missed anything or is it only happening in your site.
Please let me know with exact steps if you're able to reproduce the issue.
Your sanbox is working definitely because you do not use page builder. For our website, we have been using AVADA Page builder and in the page download we have a link with the shortcode of Avada fusion_button and atributte link. We do not translate this link while using your Advance translate. But I think, your plugin has translated automatically the url to the actually language. Therefore, our internal link were changed auto.
I tried to use custom config via xml file but not success.
Sure, 'll try that. However, sandbox do not support importing.
However, is this OK, if I remove unnecessary plugins, themes and media from your staging site and export a site package (using Duplicator or All-in-one-migration plugins)? So I can then investigate it locally and can send to our 2nd tier for investigation.
I believe there's something wrong in the DB (perhaps configs or corrupted data), that's why it is only reproduced in your site.
I removed unused plugins, themes and media (docs, videos, audios and unattached) from the staging site. Then tried to create a package but due to Kinsta restrictions, I can only use Duplicator. However, this ones also breaks due to server interruptions - thus not being able to create a backup.
Can you create a fresh backup of the staging site from your hosting panel? Please consider followings:
- There are thousands of images in Media which we don't use, try to delete theme from staging.
- Take a backup.
- Upload to somewhere safe and provide the link to download.
- I've enabled your next reply as private to provide the link and/or backup files safely.
Meanwhile I've escalated the issue to our 2nd tier team but since we're not able to reproduce the issue in the sandbox, it is much important to have a copy of your staging site.
- I had already created this page using Avada Builder: hidden link
So if you check, the button link refers to its German version hidden link.
While on Downloads page (hidden link) it doesn't work.
So here are the exceptions:
- Child theme contains several custom code which may be conflicting with this. So you should probably check that, because fixing custom code is out of scope of this forum.
- For the Downloads page, perhaps that page has some corrupted entries. I'll advise to delete the page (from Trash also) and recreate it.