WPML
Status
Resolved by author
Related plugin/theme
Royal Elementor Addons
Topic tags
Compatibility

Overview of the issue

If you are using the Nav Menu widget from Royal Elementor Addons plugin, you will encounter that it renders WPML language switcher in raw HTML on the frontend.

Workaround

Please, make sure of having a full site backup of your site before proceeding.


  • Open …/wp-content/plugins/royal-elementor-addons/modules/nav-menu/widgets/wpr-nav-menu.php file.

  • Look for line 1656.

  • Replace:
    				$output  ='<a href="'. esc_url($item->url) .'" class="'. esc_attr($item_class) .'">'. esc_html($item->title);

  • With:
    				$output  ='<a href="'. esc_url($item->url) .'" class="'. esc_attr($item_class) .'">'. wp_kses($item->title, array( 'span' => array() ));

All known issues →