דלג על ניווט

Open

Reported for: WPML Multilingual CMS 4.6.5

Topic Tags: Compatibility

Overview of the issue

If you're using the Divi theme alongside WPML, you might have noticed that when you change your site's default language, the translation for the global footer no longer shows up.

Workaround

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

  • Open your theme's functions.php file.
  • Add this code:
    // WPML Workaround for compsupp-6904
    add_filter( 'et_pb_module_shortcode_attributes', 'wpml_compsupp6904_translate_global_module_id', 10, 5 );
    
    function wpml_compsupp6904_translate_global_module_id( $props, $attrs, $render_slug, $_address, $content ) {
    	if ( isset( $props['global_module']) && is_numeric($props['global_module']) ) {
    		$props['global_module'] = apply_filters( 'wpml_object_id', $props['global_module'] , get_post_type( $props['global_module'] ) , TRUE  );
    	}	
        return $props;
    }
    

4 תגובות אל “Divi - Global Footer Translation is not displayed upon changing the default language”

    • Hello Mattias!

      Please check:
      – If the code is being added to the functions.php file
      – If it is being added to the end of the file, and not within another function
      – If there is a tag ending PHP at the end of the file (e.g. "?>") this snippet must be inserted before

      If the issue persists, please open a support ticket or chat: https://wpml.org/forums/forum/english-support/

  1. Buenos días, yo he probado a introducir el código y a mi sigue sin mostrar el pie traducido.
    Yo tengo un pie realizado con el divi builder
    ¿Pueden dar alguna solución?

    • Hola Juan,

      Por favor, abra un ticket en nuestro foro de soporte, nuestro equipo verificará el problema y lo ayudará.

השאר מענה

אנא הישארו בנושא והיו מכבדים לאחרים. אם אתה צריך עזרה בבעיות שאינן קשורות לפוסט הזה, השתמש בפורום התמיכה שלנו כדי להתחיל צ'אט או לשלוח כרטיס.

תוכל להשתמש בתגים הבאים:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>