Sauter la navigation

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.

Laisser une réponse

Veuillez rester dans le sujet et respecter les autres. Si vous avez besoin d'aide pour des questions qui ne sont pas liées à ce message, utilisez notre Forum d'assistance pour entamer une discussion ou soumettre un ticket.

Vous pouvez utiliser ces balises :
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>