This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing issues with the CSS class in the Nav Menu Widget from Royal Addons for Elementor when using WPML, there are a couple of workarounds you can try.
Solution:
Workaround 1:
Disable the menu language switcher and instead use a Custom Language Switcher Shortcode inside an Elementor Shortcode Widget. The shortcode is:
[wpml_language_selector_widget]
. To enable and customize this shortcode, go to WPML -> Languages page and adjust the settings in the Custom Language Switcher section.
Workaround 2:
Modify the plugin file at
.../wp-content/plugins/royal-elementor-addons/modules/nav-menu/widgets/wpr-nav-menu.php
. On line 1698, change:
//add_filter( 'walker_nav_menu_start_el', [ $this, 'custom_menu_items' ], 10, 4 );
Additionally, on line 1656, replace:
$output ='<a href="'. esc_url($item->url) .'" class="'. esc_attr($item_class) .'">'. esc_html($item->title);</a>
With:
$output ='<a href="'. esc_url($item->url) .'" class="'. esc_attr($item_class) .'">'. wp_kses($item->title, array( 'span' => array() ));</a>
If these solutions do not resolve your issue or if they become outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic is split from https://wpml.org/forums/topic/why-if-i-activated-wpml-plugins-content-on-website-disappeared/
This topic contains 5 replies, has 2 voices.
Last updated by 10 months, 2 weeks ago.
Assisted by: Andreas W..