Resolved by author
Resolved in: Avada 7.11.4
Overview of the issue
When manually translating an Avada Library Element using the WordPress editor, the element’s type (e.g., « Container ») isn’t carried over to the translated version. Consequently, the translated element is always identified as a Template type.
Duplicating to other languages or translated using the Advanced Translation Editor (ATE) don’t present this issue.
Workaround
Please, make sure of having a full backup of your site before proceeding.
Option 1
- Duplicate the Element first
- Then, edit, translate it independently and change the value.
Option 2
- Open your theme’s functions.php file.
- Add the following code:
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 ); } } } } - Go to Avada > Library.
- Then, open and save your Element first.
- Reload the page and then add the needed elements.