Last active
November 27, 2018 15:37
-
-
Save vladutilie/60563961882cc728395e398048df228a to your computer and use it in GitHub Desktop.
Custom logo for WP Dentist, WordPress theme: replace h1 tag from wp-dentist/inc/functions/template-hooks.php with this one
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
<h1 id="logo"> | |
<?php | |
$custom_logo_id = get_theme_mod( 'custom_logo' ); | |
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' ); | |
if ( has_custom_logo() ) { | |
echo '<a href="'. esc_url( home_url( '/' ) ) .'" title="'. esc_attr( get_bloginfo( 'name', 'display' ) ) .'" rel="home"><img src="'. esc_url( $logo[0] ) .'"></a>'; | |
} else { | |
echo '<a class="navbar-brand" href="'. esc_url( home_url( '/' ) ) .'" title="'. esc_attr( get_bloginfo( 'name', 'display' ) ) .'" rel="home">'. esc_html( bloginfo('name') ) .'</a>'; | |
} | |
?> | |
</h1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment