דלג על ניווט

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.

השאר מענה

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

תוכל להשתמש בתגים הבאים:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>