Bỏ qua điều hướng

Open

Reported for: WPML Multilingual CMS 4.6.13

Topic Tags: Compatibility

Overview of the issue

In the Avada theme, when using the “Gallery Widget” within a post template, images added dynamically (Dynamic Source Option) through an ACF Repeater field fail to display in the second language after translation.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme’s functions.php file.
  • Add the following snippet:
    // WPML Workaround for compsupp-7640
    function wpml_compsupp7640_filter_fusion_gallery_image_shortcode($out, $pairs, $atts) {
    	
        if (isset($atts['image_id']) && $atts['image_id'] == 0 && !empty($atts['image'])) {
            $atts['image_id'] = '';
        }
        
        // Re-build the shortcode output with the modified attributes
        $out = shortcode_atts($pairs, $atts);		
        
        return $out;
    }
    add_filter('shortcode_atts_fusion_gallery_image', 'wpml_compsupp7640_filter_fusion_gallery_image_shortcode', 10, 3);
    

Để lại phản hồi

Vui lòng bám sát chủ đề và tôn trọng người khác. Nếu bạn cần trợ giúp với các vấn đề không liên quan đến bài đăng này, hãy sử dụng Diễn đàn Hỗ trợ của chúng tôi để bắt đầu trò chuyện hoặc gửi yêu cầu hỗ trợ.

Bạn có thể sử dụng các thẻ sau:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>