Saltar navegación

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.

Deje una respuesta

Por favor, mantente dentro del tema y sé respetuoso con los demás. Si necesitas ayuda con cuestiones no relacionadas con este post, utiliza nuestro Foro de soporte para iniciar un chat o enviar un ticket.

Puede utilizar estas etiquetas:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>