WPML
สถานะ
เปิด
รายงานสำหรับ
WPML Multilingual CMS 4.6.13
ปลั๊กอิน/ธีมที่เกี่ยวข้อง
Avada
แท็กหัวข้อ
Compatibility

ภาพรวมของปัญหา

ในธีม Avada เมื่อใช้ “Gallery Widget” ภายในเทมเพลตโพสต์ รูปภาพที่เพิ่มแบบไดนามิก (Dynamic Source Option) ผ่านฟิลด์ ACF Repeater จะไม่แสดงในภาษาที่สองหลังจากการแปล

วิธีแก้ปัญหาชั่วคราว

โปรดตรวจสอบให้แน่ใจว่าได้สำรองข้อมูลไซต์ทั้งหมดของคุณก่อนดำเนินการต่อ


  • เปิดไฟล์ functions.php ของธีมของคุณ

  • เพิ่มโค้ดต่อไปนี้:
    // 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);

ปัญหาที่ทราบแล้วทั้งหมด →