- สถานะ
- แก้ไขแล้วโดยผู้พัฒนา
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- The Plus Addons for Elementor
- แท็กหัวข้อ
- Compatibility, Elementor Custom Widgets
ภาพรวมของปัญหา
เมื่อใช้งาน The Plus Addons for Elementor Pro เนื้อหาภายในวิดเจ็ต Tabs จะไม่ได้รับการแปล
วิธีแก้ปัญหาชั่วคราว
โปรดตรวจสอบให้แน่ใจว่าคุณได้ทำการสำรองข้อมูลไซต์ทั้งหมดของคุณก่อนดำเนินการต่อ
- เปิดไฟล์ functions.php ของธีมของคุณ
add_filter('elementor/frontend/before_render', 'wpml_compsupp7837_filter_loop_grid_widget'); function wpml_compsupp7837_filter_loop_grid_widget($element) { if ('tp-tabs-tours' !== $element->get_name()) { return $element; } $settings = $element->get_settings(); if (!isset($settings['tabs']) || !is_array($settings['tabs'])) { return $element; } $tabs = $settings['tabs']; foreach ($tabs as $key => $value) { if (empty($value['content_template']) || !is_numeric($value['content_template'])) { continue; } // Use apply_filters to adjust template_id for WPML $id = apply_filters('wpml_object_id', $value['content_template'], get_post_type($value['content_template']), true); if (!is_numeric($id)) { continue; } $tabs[$key]['content_template'] = $id; } $settings['tabs'] = $tabs; $element->set_settings('tabs', $settings['tabs']); }