[ad_1]
I’m traying to swap the website logo in the header depending on language.
The site uses English and French and has a default English version logo set by the site theme (Enfold)
Im using a child theme and have added the following script from a previous solution to the problem to my functions.php file in the child theme:
The below solution works in part – the french logo shows up fine but switching back to english and the image doesnt load and instead just shows the image title.
<?php
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
$currentlang = get_bloginfo(‘language’);
if($currentlang==”fr-FR”){
{
$logo = “http://localhost/blah-blah/french-logo.jpg”;
}
if($currentlang==”en-GB”)
{
$logo = “http://localhost/blah-blah/english-logo.jpg”;
}
return $logo;
}
}
?>
If i delete the php filter then the English logo shows up fine and switching language keeps showing the english logo (which is what you would expect).
Anyone have any ideas?
