<div class="b-header">
  <nav class="navbar navbar-expand-lg navbar-light">
    <div class="container">

      <?php
      if(has_custom_logo()):
        the_custom_logo();
      endif; ?>

      <?php
      $social_charity_description = get_bloginfo( 'description', 'display' );
      if ( $social_charity_description || is_customize_preview() ) : ?>
        <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" class="navbar-brand"><?php bloginfo( 'name' ); ?></a></h1>
        <p class="site-description ml-1 mb-1"></p>
      <?php endif; ?>

      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <div id="nav-icon3">
          <span></span>
          <span></span>
          <span></span>
          <span></span>
        </div>
      </button>

      <?php
      if ( has_nav_menu( 'primary' ) ) :
        wp_nav_menu( array(
          'theme_location'    => 'primary',
          'depth'             => 7,
          'menu_class'        => 'navbar-nav ml-auto',
          'container_class'   => 'collapse navbar-collapse',
          'container_id'      => 'navbarSupportedContent', 
          'fallback_cb'       => 'Social_Charity_Navwalker::fallback',
          'walker'            => new Social_Charity_Navwalker(),
        ));
        ?>
        <?php else : ?>
          <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ml-auto">
              <li class="nav-item">
                <a href="<?php echo esc_url(admin_url( 'nav-menus.php' )); ?> " class="nav-link"> <?php esc_html_e('Add a menu','social-charity'); ?></a>
             </li>
           </ul>
         </div>
       <?php endif; ?>
     </div>
   </nav>
 </div>