Merge pull request #73 from jessijean/master
Changes to custom logo code in header.php - Thx @jessijean for fixing that
This commit is contained in:
commit
ea51a869fe
|
@ -47,7 +47,11 @@
|
|||
</button>
|
||||
|
||||
<!-- Your site title as branding in the menu -->
|
||||
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php if ( !has_custom_logo() ) { bloginfo( 'name' ) } else { the_custom_logo() } ?></a>
|
||||
<?php if (!has_custom_logo()) { ?>
|
||||
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -65,7 +69,6 @@
|
|||
|
||||
</div> <!-- .container -->
|
||||
|
||||
|
||||
</nav><!-- .site-navigation -->
|
||||
|
||||
</div><!-- .wrapper-navbar end -->
|
||||
|
|
|
@ -37,3 +37,12 @@ function adjust_body_class( $classes ) {
|
|||
return $classes;
|
||||
|
||||
}
|
||||
|
||||
// Filter custom logo with correct classes
|
||||
add_filter('get_custom_logo','change_logo_class');
|
||||
function change_logo_class($html)
|
||||
{
|
||||
$html = str_replace('class="custom-logo"', 'class="img-responsive"', $html);
|
||||
$html = str_replace('class="custom-logo-link"', 'class="navbar-brand" custom-logo-link', $html);
|
||||
return $html;
|
||||
}
|
||||
|
|
Reference in New Issue