WPML
סטטוס
נפתר על ידי המפתח
תוסף/ערכת עיצוב קשורים
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']);
    }
            

כל התקלות הידועות →