Saltar navegación

Open

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

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.

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>