Created
September 7, 2016 08:29
-
-
Save kirandash/2353e08cd79e4224b3f7d90e25233a97 to your computer and use it in GitHub Desktop.
custom logo
This file contains hidden or 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
<?php | |
// Add theme support for custom logo as it is required for WordPress 4.5 onwards | |
add_theme_support( 'custom-logo', array( | |
'width' => 367, | |
'height' => 92, | |
'flex-width' => true, | |
'flex-height' => true | |
) | |
); | |
/** | |
* knops Custom Logo | |
*/ | |
function knops_get_custom_logo() { | |
if ( function_exists( 'get_custom_logo' ) ) { | |
return get_custom_logo(); | |
} | |
} | |
?> |
This file contains hidden or 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
<?php if(function_exists('glamsdalens_get_custom_logo')): $logoOutput = glamsdalens_get_custom_logo(); else: $logoOutput = ''; endif; | |
if( ($logoOutput != '') ): | |
echo '<div class="navbar-brand">'.$logoOutput.'</div>'; | |
else : ?> | |
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> | |
<?php | |
$description = get_bloginfo( 'description', 'display' ); | |
if ( $description || is_customize_preview() ) : ?> | |
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p> | |
<?php | |
endif; ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment