WPML

ภาพรวมของปัญหา

หลังจากแปลโพสต์ที่มีองค์ประกอบ 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
	);

ปัญหาที่ทราบแล้วทั้งหมด