- สถานะ
- แก้ไขแล้วโดยผู้พัฒนา
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- BeTheme
- แท็กหัวข้อ
- Compatibility
ภาพรวมของปัญหา
หากคุณกำลังใช้ธีม BeTheme และ global sections ของธีม คุณอาจพบว่าส่วนเหล่านี้ไม่แสดงเวอร์ชันที่แปลแล้วในภาษารอง แม้ว่าจะมีคำแปลพร้อมใช้งานก็ตาม
วิธีแก้ปัญหาชั่วคราว
โปรดตรวจสอบให้แน่ใจว่าได้ทำการสำรองข้อมูลเว็บไซต์ทั้งหมดก่อนดำเนินการต่อ
- เปิดไฟล์ …/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php
- แทนที่โค้ดนี้:
public function show_sections($mfn_items, $vbtoolsoff = false){ if( !is_array($mfn_items) ) return; foreach ($mfn_items as $s => $section) { $section_class = []; - ด้วย:
public function show_sections($mfn_items, $vbtoolsoff = false){ if( !is_array($mfn_items) ) return; foreach ($mfn_items as $s => $section) { // WPML workaround for compsupp-7262 if( class_exists('Sitepress') && ! empty($section['mfn_global_section_id'] ) ) { $section['mfn_global_section_id'] = apply_filters( 'wpml_object_id', $section['mfn_global_section_id'], get_post_type($section['mfn_global_section_id']) , TRUE ); } $section_class = []; - จากนั้น เปิดไฟล์ …/wp-content/themes/betheme/functions/post-types/class-mfn-post-type-template.php
- ค้นหาบรรทัดที่ 21
- แทนที่:
public function __construct(){ if( !apply_filters('bebuilder_access', false) ){ return false; } if( !current_user_can('editor') && !current_user_can('administrator') ){ return false; } parent::__construct(); // fires after WordPress has finished loading but before any headers are sent add_action('init', array($this, 'register')); - ด้วย:
public function __construct(){ // WPML Workaround for compsupp-7262 (Part 2) if ( ! class_exists('Sitepress') ) { if( !apply_filters('bebuilder_access', false) ){ return false; } if( !current_user_can('editor') && !current_user_can('administrator') ){ return false; } } parent::__construct(); // fires after WordPress has finished loading but before any headers are sent add_action('init', array($this, 'register'));