Tagged: site logo svg translate
I’m using svg image on the whole site where I can including the site logo.
I couldn’t get the svg I created to display.
I had help from Guenni007 creating the site logo.
Now I’ve installed Translatepress and managed to translate everything on the site including different images for some of the icons containing text, however I can not translate the site logo as I don’t get the edit pencil.
I’ve noticed looking at the code that the SVG from the site logo is embedded in the code and that the other images are links to the file.
This is probably the cause that Translatepress doesn’t recognizes the logo as an image ans also why my svg files don’t work for the logo.
Is there a way to use a link for the svg site logo instead of it being embedded?
This is the link to the site behind Underconstruction: https://www.happyplaceservices.be/?ucp-access=b975c9df
Hey Dirk,
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
$currentlang = get_bloginfo('language');
if($currentlang=="nl-NL"){
{
$logo = "http://localhost/blah-blah/nl-logo.jpg";
}
if($currentlang=="en-GB")
{
$logo = "http://localhost/blah-blah/gb-logo.jpg";
}
return $logo;
}
}
replace the image url’s with yours.
I have not tested Translatepress, but with WPML the theme panel has different settings for each language
if you have this option you can change the logo in the theme settings.
Best regards,
Mike