Logo in header
-
I apologize for the repetitive question, but the topic with the same name is marked resolved and there is no real answer to the question. I need to place a logo in the header where the site title is currently positioned (top left). Does anyone care to share how to do this exactly? I realize the code within the header.php file needs to be edited, but I am requesting more specific instruction because I am fearful I will break something.
In the header.php file, I am looking at this section of code. Can you please advise me on what to do to eliminate the site title and replace it with my logo image?
<?php // Collapsed navbar menu toggle global $theme_options; $navbar = '<div class="navbar ' . $theme_options['navbar_classes'] . '">' .'<div class="container">' .'<div class="navbar-header">' .'<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">' .'<span class="icon-bar"></span>' .'<span class="icon-bar"></span>' .'<span class="icon-bar"></span>' .'</button>'; // Site title (Bootstrap "brand") in navbar. Shown by default. Customizer will // let you hide it if you want. $navbar .= '<a class="navbar-brand" href="' .esc_url( home_url( '/' ) ) .'" rel="home">' .get_bloginfo( 'name' ) .'</a>'; $navbar .= '</div><!-- navbar-header -->'; // Display the desktop navbar $navbar .= wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'navbar-collapse collapse', //<nav> or <div> class 'menu_class' => 'nav navbar-nav', //<ul> class 'walker' => new wp_bootstrap_navwalker(), 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'echo' => false ) ); echo apply_filters( 'xsbf_navbar', $navbar ); ?>
This is the HTML I would normally use to place my header:
<a class="navbar-brand" rel="home" href="https://candtconstruction.com"> <img width="155" height="50" alt="CandTConstruction" src="https://candtconstruction.com/wp-content/themes/pratt/images/logo-50.gif"></a>
Thank you in advance for your time.
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Logo in header’ is closed to new replies.