Cet utilisateur n'a pas de sujets favoris.
Démarré par: reneB-22 en: English Support
reneB-22
Démarré par: reneB-22 en: Chat Support
Démarré par: reneB-22 en: English Support Une solution rapide est disponible
Problem: I can't translate the links of the social icons Elementor widgets.
Solution: Please add this code to the functions.php file of your theme:
add_action('init', function (){ add_filter( 'wpml_elementor_widgets_to_translate', 'socialwidgetelementor' ); }); function socialwidgetelementor($widgets) { $widgets['social-icons'] = array( 'conditions' => array('widgetType' => 'social-icons'), 'fields' => array(), 'integration-class' => array( 'my_icons' ) ); return $widgets; } class my_icons extends WPML_Elementor_Module_With_Items { public function get_items_field() { return 'social_icon_list'; } public function get_fields() { return array( 'link' => array( 'url' ), ); } protected function get_title($field) { switch ($field) { case 'url': return __( 'Link', 'elementor' ); default: return ''; } } protected function get_editor_type($field) { switch ($field) { case 'url': return 'LINK'; default: return ''; } } }
and add again the Social Icons widget to the page.
Relevant Documentation: https://wpml.org/documentation/plugins-compatibility/elementor/how-to-add-wpml-support-to-custom-elementor-widgets/#multiple-occurrences-of-the-same-field
Dražen Duvnjak