Tagged: header, logo, multilingual
-
AuthorPosts
-
June 15, 2018 at 1:28 pm #973289
Is it possible to include two different logos (per language – DE/FR)? Use the Polylang plugin.
Thank you for your help.June 16, 2018 at 7:27 pm #973709Hey Esther,
Here are some threads to consider:
https://wordpress.org/support/topic/polylang-logo-change/
If you need further assistance please let us know.
Best regards,
VictoriaJune 18, 2018 at 2:02 pm #974256Hoi Victoria,
Thank you for your advice. But what is not quite clear to me: Which function.php do I have to adapt now?
/wp-content/themes/enfold-child/functions.php (because I use enfold-child)
/wp-content/themes/enfold/functions.php
/wp-content/themes/enfold/functions-enfold.phpThe directory for the logos is, I think at least, this one:
/wp-content/themes/enfold/images/layoutFor this reason I also adjusted the path for the logos in the script accordingly:
function pojo_polylang_get_multilang_logo( $value ) {
if ( function_exists( ‘pll_current_language’ ) ) {
$logos = array(
‘de_CH’ => ‘Logo_DE.png’,
‘fr_FR’ => ‘Logo_FR.png’,
);
$default_logo = $logos[‘en’];
$current_lang = pll_current_language();
$assets_url = get_stylesheet_directory_uri() . ‘/images/layout/’;
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_polylang_get_multilang_logo’ );Thank you very much for your help!
Best regards,
EstherJune 18, 2018 at 10:48 pm #974517Hi,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.
