Created
May 19, 2016 13:56
-
-
Save gareth-gillman/ccdd40bff5b2e31339a2e37e338cdd59 to your computer and use it in GitHub Desktop.
Default Logo for WordPress Custom Logo (since 4.5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('get_custom_logo', 'prefix_custom_logo_default', 10); | |
function prefix_custom_logo_default($html){ | |
if(empty($html)){ | |
$html = '<a href="'.esc_url(site_url()).'" class="custom-logo-link" rel="home" itemprop="url">'; | |
$html .= '<img src="'.get_template_directory_uri() .'/images/logo.png" alt="Logo" class="custom-logo" itemprop="logo" />'; | |
$html .= '</a>'; | |
} | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment