I want to remove the default enfold logo when no logo image is selected in the theme options admin panel. I found this closed thread (https://kriesi.at/support/topic/remove-default-enfold-logo-from-header-permanently/) where a solution is provided to remove all logo output, even if it’s not the default enfold logo.
Can’t i validate the selected image that is used as logo to see if it’s a user-uploaded image or if it’s the theme default?
That would be totally awesome and more professional in a production environment.
Hi tomcuylaerts!
Just upload your own logo into /enfold/images/layout/ and rename it to logo.png for an easy fix.
Cheers!
Elliott
For those wo are looking for a more complete solution, add this in your (child theme’s) functions.php file:
add_filter('avf_logo_final_output', 'avia_remove_default_logo', 10, 6);
function avia_remove_default_logo($logo, $use_image, $headline_type, $sub, $alt, $link){
if(strpos($logo,'enfold/images/layout/logo.png'))
return '';
else
return $logo;
}
Variable $use_image is always the path to the default logo, so you can’t use that.
This generates no output when no logo is uploaded.