Pular a navegação

Waiting for author

Topic Tags: Compatibility

Overview of the issue

Currently, it is not possible to translate links within the Mega Menu widget provided by the Unlimited Elements for Elementor plugin.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Go to WPML > Settings > Custom XML Configuration page.
  • Add the following XML:
    <wpml-config>
      <elementor-widgets>
        <widget name="ucaddon_mega_menu">
          <fields-in-item items_of="uc_items">
            <field>title</field>
            <field key_of="link">url</field>
            <field key_of="link2">url</field>
          </fields-in-item>
        </widget>
      </elementor-widgets>
    </wpml-config>
    
  • Then, open your theme’s functions.php file.
  • Add the following code:
    add_filter( 'wpml_pb_elementor_register_string_name_ucaddon_mega_menu', function( $name, $args ) {
    	$widgetType = $args['element']['widgetType'];
    	return $widgetType . '-' . $args['key'] . '-' . $args['field'] . '-' . $args['nodeId'] . '-' . $args['item']['_id'];
    }, 10, 2 );
    
  • Refresh and retranslate your page.

If this workaround doesn’t help, please open a chat in our assistance channel.

Deixar uma Resposta

Por favor, mantenha-se no tópico e respeite os outros. Se você precisar de ajuda com problemas não relacionados a esta postagem, use nosso Fórum de suporte para iniciar um bate-papo ou enviar um tíquete.

Você pode usar estas tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>