Navigation überspringen

Open

Topic Tags: Compatibility

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 WPMLLanguages.
  • 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 WPMLLanguages to hide the text and links altogether.

Alternatively, you can:

  1. Create a backup of your site or test this workaround on a staging site.
  2. Add the following code at the end of your active theme’s functions.php file and save the changes:
  3. 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);
    
  4. Edit the page with the issue in the default language.
  5. Resave it.
  6. Update the translation.

Eine Antwort hinterlassen

Bitte bleiben Sie beim Thema und verhalten Sie sich anderen gegenüber respektvoll. Wenn Sie Hilfe bei Problemen benötigen, die nicht mit diesem Beitrag zusammenhängen, nutzen Sie unser Support-Forum, um einen Chat zu starten oder ein Ticket einzureichen.

Sie können diese Tags verwenden:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>