• Hello, I would like to ask you how to change the logo of the website for different languages using Polylang plugin. I have used the additional code for functions.php (on my other websites using diff theme this works smoothly, but with this one I am struggling a little).

    I used this:
    function custom_polylang_multilang_logo( $value ) {
    if ( function_exists( ‘pll_current_language’ ) ) {
    $logos = array(
    ‘sk’ => wp_get_attachment_image(‘9’, ‘full’),
    ‘en’ => wp_get_attachment_image(‘743’, ‘full’),
    );
    $default_logo = $logos[‘sk’];
    $current_lang = pll_current_language();
    if ( isset( $logos[ $current_lang ] ) )
    $value = $logos[ $current_lang ];
    else
    $value = $default_logo;
    }
    $html = sprintf( ‘%2$s‘,
    esc_url( home_url( ‘/’ ) ),
    $value
    );
    return $html;
    }
    add_filter( ‘get_custom_logo’, ‘custom_polylang_multilang_logo’ );

    But with this theme it is not working. Can you please give me some hints how to proceed? Thanks a lot! =) Best wishes, Kaya

    The page I need help with: [log in to see the link]

  • The topic ‘Logo change for different website languages’ is closed to new replies.