- สถานะ
- แก้ไขแล้ว
- แก้ไขใน
- Avada 7.2
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- Avada
ภาพรวมของปัญหา
หลังจากแปลโพสต์ที่มีองค์ประกอบ global จาก Fusion Builder ในธีม Avada เนื้อหาปรากฏในภาษาเริ่มต้นแทนที่จะเป็นภาษาที่แปล
วิธีแก้ปัญหาชั่วคราว
แก้ไขไฟล์ wpml-compatibility-plugin-fusion-global-element-hooks.php ที่อยู่ในโฟลเดอร์ wp-content/plugins/sitepress-multilingual-cms/compatibility/fusion_builder/ และเพิ่มโค้ดต่อไปนี้:
add_filter( 'the_content', [ $this, 'translate_global_element_ids' ], self::BEFORE_ADD_GLOBAL_ELEMENTS_PRIORITY );… ไว้หลังโค้ดนี้:
public function add_hooks() {
add_filter(
'content_edit_pre',
[ $this, 'translate_global_element_ids' ],
self::BEFORE_ADD_GLOBAL_ELEMENTS_PRIORITY
);