Open
Overview of the issue
The text and links to available translations display more than once when using the following settings:
- The Links to translation of posts option is enabled in WPML → Languages.
- You use the Avada theme builder feature with Global Layouts
Workaround
Our development team is aware of this problem and is working hard to fix the issue permanently.
As a temporary workaround, you can deactivate the Links to translation of posts option in the WPML → Languages to hide the text and links altogether.
Alternatively, you can:
- Create a backup of your site or test this workaround on a staging site.
- Add the following code at the end of your active theme’s functions.php file and save the changes:
- Edit the page with the issue in the default language.
- Resave it.
- Update the translation.
add_filter('the_content', function ($content){ if (is_single()) { if ($content == get_the_content()) { remove_filter('wpml_ls_post_alternative_languages', '__return_false'); } else { add_filter('wpml_ls_post_alternative_languages', '__return_false'); } } else { add_filter('wpml_ls_post_alternative_languages', '__return_false'); } return $content; }, 1);