Hello,
I have the code to change the logo on a specific page or group of pages. The problem is the main site is using a transparent header with alternative logo and on my specific page, I wish to use transparent header as well. The Enfold theme logo set and I cannot find the code needed to set a specific transparent (subtext) logo on that page that is using a different main logo.
This function allows me to replace everything located between the subtext DIV. Is this the only way to set and alternative transparent logo on a specific page? Or is there a way to just change the SRC in the image tag without having to re-type out the entire contents?
add_filter('avf_logo_subtext','av_change_logo_subtext');
function av_change_logo_subtext($subtext)
{
if(is_page(47) )
{
$subtext = '<img src="./wp-content/uploads/2020/01/Decepta_Con_White-WEB.png" alt="Decepta Con" />';
}
return $subtext;
}
Hi MRMCrawford,
It is a better solution, the one you shared above. To change the src you will need to use JavaScript which will be reloading the image after the first one loaded. With the function above the correct image will be loaded at once.
Best regards,
Victoria
