Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.4.10

Overview of the issue

When using a multilingual text widget, WPML gives you the ability to select the widget language and choose for which languages you want the widget to display. However, if you set your widget as being written in one language but you choose to display it on a different one, the widget does not display at all on your site.

This widget’s language is set to French, but it is set to display on Spanish pages.

Workaround

As workaround you can use a default WordPress Text widget and display it on the desired language.

To avoid confusion, you can also completely remove the dropdown to select which language to display your widget. To do this, please applying the following workaround:

  • Make a full backup of your site.
  • Go to wp-content\plugins\sitepress-multilingual-cms\classeswidgets\class-wpml-widgets-support-backend.php
  • Change:
    echo $this->template_service->show( $model, 'language-selector.twig' );
    

    to:

    if (( $widget->name !== "Multilingual Text" ) && ( $widget->option_name !== "widget_text_icl" )) {
        echo $this->template_service->show( $model, 'language-selector.twig' );
    }
    

2 Responses to “Displaying a multilingual text widget in one language on a page in a different language does not work”

  1. The site does not work for me with this plugins activated: WPML Multilingual CMS …
    I’ll send you cpanel and wordpress data if you can solve it, because the theme is fine, something happens with the wpml plugins …

    [removed]

    Thanks a lot

    • Hello there,

      I’ve edited the site details from your comment as it is a public forum. However, according to your description your situation is not related to the issue here presented.
      Could you please open a ticket in our support forum? We have there all the tools needed in order to help you better.
      https://wpml.org/forums/forum/english-support/

      Regards