WPML

问题概述

Happy Elementor Addons 存在兼容性问题,特别是 Content Switcher 小工具。在通过 WPML 设置的多语言网站中使用时,Content Switcher 小工具无法根据当前查看的语言显示正确的已翻译模板。相反,它仅显示原始语言模板,忽略了翻译。

临时解决方法

继续操作之前,请确保对您的站点进行完整备份。

  • 打开 …/wp-content/plugins/happy-elementor-addons/widgets/content-switcher/widget.php文件。
  • 找到第 1207 行。
  • 将:
    else :
  • 更改为:
    else :
    	$primary['saved_section'] = apply_filters('wpml_object_id', $primary['saved_section'], 'elementor_library');
    	$primary['saved_pages'] = apply_filters('wpml_object_id', $primary['saved_pages'], 'elementor_library');
    	$secondary['saved_section'] = apply_filters('wpml_object_id', $secondary['saved_section'], 'elementor_library');
    	$secondary['saved_pages'] = apply_filters('wpml_object_id', $secondary['saved_pages'], 'elementor_library');

所有已知问题