- Trạng thái
- Đã được giải quyết bởi nhà phát triển
- Plugin/giao diện liên quan
- The Plus Addons for Elementor
- Thẻ chủ đề
- Compatibility, Elementor Custom Widgets
Tổng quan về lỗi
Khi sử dụng The Plus Addons for Elementor Pro, nội dung bên trong widget Tabs không được dịch.
Giải pháp tạm thời
Vui lòng đảm bảo sao lưu toàn bộ trang web của bạn trước khi tiếp tục.
- Mở tệp functions.php trong giao diện của bạn.
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']); }