Hi:
I have one WP site and 3 primary domain names pointing to it.
For domainA.com, I want to display https://domaina.com/wp-content/uploads/01/01/domaina-logo.png as the logo
For domainB.com, I want to display https://domaina.com/wp-content/uploads/01/01/domainb-logo.png as the logo
For domainB.com, I want to display https://domaina.com/wp-content/uploads/01/01/domainc-logo.png as the logo
I have removed the site logo from the Customizer and created a child-theme with the following code in it:
function change_logo_of_site($logo_url){
$logo_url = $logo_url;
$home = home_url();
$home = $_SERVER['HTTP_REFERER'];
if($home=='https://domainA.com/'){
$logo_url = 'https://domaina.com/wp-content/uploads/01/01/domaina-logo.png';
}
if($home=='https://domainB.com/'){
$logo_url = 'https://domaina.com/wp-content/uploads/01/01/domainb-logo.png';
}
if($home=='https://domainC.com/'){
$logo_url = 'https://domaina.com/wp-content/uploads/01/01/domainc-logo.png';
}
return $logo_url;
}
add_filter('generate_logo','change_logo_of_site',10,1);
This is not working.
I’ve attempted to place this code into the Appearance > GP Hooks > wp_head area as PHP as well, but no luck.
Can anyone shed light on this for me?