I tried to use this code in my Child Theme function.php, but it doesn’t work with Human 🙁 Please help!!!
function custom_polylang_multilang_logo( $value ) {
if ( function_exists( 'pll_current_language' ) ) {
$logos = array(
'en' => wp_get_attachment_image('21', 'full'),
'bg' => wp_get_attachment_image('20', 'full'),
);
$default_logo = $logos['bg'];
$current_lang = pll_current_language();
if ( isset( $logos[ $current_lang ] ) )
$value = $logos[ $current_lang ];
else
$value = $default_logo;
}
$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( home_url( '/' ) ),
$value
);
return $html;
}
add_filter( 'get_custom_logo', 'custom_polylang_multilang_logo' );