[Resolved] Elementor button permalink only points to default language
This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing an issue where an Elementor button points to a page and does not switch to the respective language when changing languages, staying directed at the default English language instead.
Solution:
First, ensure that the template containing the button is translated. Follow these steps:
1. Navigate to Templates -> All -> Header in your WordPress dashboard.
2. Use the translation editor to translate the header template.
After translating the header template, the button should correctly point to the translated post. For further guidance, we recommend checking our guide on translating Elementor templates.
If the button still does not work correctly after these steps, or if you encounter additional issues such as with the query loop, we suggest opening a new support ticket for each separate issue.
Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. We highly recommend checking related known issues on the WPML known issues page, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.
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.
I have an Elementor button that points to an existing page. When I switch between languages the link does not switch its respective language, but stays pointed at my English default language.
See screenshot, of how I add and link the button.
If I use the button functionality in Gutenberg, then it works as expected, and the URLs show up like below correctly with languages part of the permalink as such:
English > /book-tickets/
Chinese Traditional > /zh-hant/book-tickets/
Chinese Simplified > /zh-hans/book-tickets/
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) Could you please login to this sandbox site and create a test page using the same button widget? (hidden link)
After that, please translate this page to replicate the issue. If the issue is replicable, please tell me the steps to reproduce it.
2) It's not related to the issue, but according to your Debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. Minimum requirements for WPML are 128Mb. (Kindly check this page https://wpml.org/home/minimum-requirements/)
Add this to the top of wp-config.php to increase WP memory:
Thanks for your quick reply Osama - if you can help me focus on the first issue, that's more important due to the site launch later today.
hidden link
1) I created an Elementor site header, with a button that links to a translated post.
If you look at the button in the site header, and toggle the language - it keeps pointing to the english version only.
I attached a screenshot, so you can see what I see:
a) The URL is pointing at the chinese language
b) The translated sample post is showing up properly
c) If you hover over the green button you'll notice the permalink did not change
2) For the query loop issue I was describing, I realized sorry that I'm using another plugin for custom Elementor query loop templates. This might be causing an issue, and out of scope for you to look at it. If it's not, let me know and I can install it on the sandbox.
1) Thanks for replicating the first issue. I've checked the sandbox site and found that the template is not translated, so I've translated the header template using the translation editor.
After that, the translated header is correctly pointed to the translated post. Would you please check the translated page and let me know if the button works correctly?
2) For the query loop issue, we can split this into another ticket after fixing the first issue.
Hi Osama, wow that's amazing. Can you point to the URL where the site header is translated? I didn't know you could do that, but that makes total sense now.
Thank you that definitely helps me - i realize why i never saw the translation, Elementor has a table view and the gallery view of the templates. The gallery view never shows the translation option, so once I switched back I saw it.
I hope that fixes the button links on your site. If it did, please install the custom Elementor query loop on the sandbox site and try to replicate the other issue.
Hi Osama, I'm running into two issues I'm hoping you can help me understand better.
1) Joining Segments - this works fine, until i make an edit in the original language and then go back in and edit in Chinese, I have to join segments over again. This is very tedious on one page where there's about 50 joins, I can't save until I finish them all. I read this is a bug that developers are working on?
2) The other issue which I went through documentation, but does not appear to be working for me is preserving the URL slug in the original language.
So basic example, is my slug is "lunar-new-year" but a new chinese slug is generated based on the translated title. I want to always keep the slugs in english.
I've attached a screenshot of what I believe are the correct settings.
Thanks.
New threads created by Osama Mersal and linked to this one are listed below: