- الحالة
- محلولة بواسطة المطور
- تم حلها في
- Avada 7.11.4
- الإضافة/القالب ذو الصلة
- Avada
- وسوم الموضوع
- Compatibility
نظرة عامة على المشكلة
عند ترجمة عنصر مكتبة في Avada يدوياً باستخدام محرر WordPress، لا يُنقل نوع العنصر (على سبيل المثال، «Container») إلى النسخة المترجمة. ونتيجة لذلك، يُعرّف العنصر المترجم دائماً على أنه من النوع قالب.
لا تظهر هذه المشكلة عند التكرار إلى لغات أخرى أو الترجمة باستخدام محرر الترجمة المتقدم (ATE).
حل بديل مؤقت
يُرجى التأكد من أخذ نسخة احتياطية كاملة لموقعك قبل المتابعة.
الخيار 1
- كرّر العنصر أولاً
- ثم عدّله، وترجمه بشكل مستقل، وغيّر القيمة.
الخيار 2
- افتح ملف functions.php الخاص بقالبك.
- أضف الكود التالي:
add_action( 'edit_form_top', 'callback__edit_form_top' ); function callback__edit_form_top( $post ) {; if ($post->post_type == "fusion_element") { $trid = apply_filters( 'wpml_element_trid', NULL, $post->ID, 'post_'. $post->post_type ); $translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'post_'. $post->post_type ); foreach ($translations as $translation) { if ($translation->original == 1){ $original = $translation->element_id; } } $originalterms = wp_get_post_terms( $original, 'element_category' ); $currenttranslationterms = wp_get_post_terms( $post->ID, 'element_category' ); if (empty($currenttranslationterms)) { foreach ($originalterms as $term){ wp_set_object_terms( $post->ID, $term->term_id, $term->taxonomy ); } } } } - اذهب إلى Avada > Library.
- ثم افتح العنصر الخاص بك واحفظه أولاً.
- أعد تحميل الصفحة ثم أضف العناصر المطلوبة.