Support › Forums › Support (Legacy) › WPML change logo code missing from documentation › Reply To: WPML change logo code missing from documentation
12/04/2016 at 9:35
#1360
Keymaster
Hi Arthur,
This is the code:
function pojo_wpml_get_multilang_logo( $value ) {
if ( defined( ‘ICL_LANGUAGE_CODE’ ) ) {
$logos = array(
‘en’ => ‘logo-en.png’,
‘he’ => ‘logo-he.png’,
);
$default_logo = $logos[‘en’];
$current_lang = ICL_LANGUAGE_CODE;
$assets_url = get_stylesheet_directory_uri() . ‘/assets/images/’;
if ( isset( $logos[ $current_lang ] ) )
$value = $assets_url . $logos[ $current_lang ];
else
$value = $assets_url . $default_logo;
}
return $value;
}
add_filter( ‘theme_mod_image_logo’, ‘pojo_wpml_get_multilang_logo’ );
