How throw wpadminbar from menu div?

I have a problem with wordpress adminbar.
How I can throw it from my menu div or show above menu?

Screenshoot
i.stack.imgur.com/BSpDa.png

Read More

Menu (Bootstrap)

<div class="navbar-header">
  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    <span class="sr-only">Toggle navigation</span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
  <a class="navbar-brand" href="<?php bloginfo('url')?>"><?php bloginfo('name')?></a>
</div>

<?php
wp_nav_menu( array(
        'menu'              => 'primary',
        'depth'             => 2,
        'container'         => 'div',
        'container_class'   => 'navbar-collapse collapse',
        'menu_class'        => 'nav navbar-nav',
        'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
        'walker'            => new wp_bootstrap_navwalker())
    );
?>


</div>

</nav>

Related posts

2 comments

  1. Add

    add_filter('show_admin_bar', '__return_false');
    

    To your functions.php

    EDIT: Set your navigation bar’s margin-top to the height of the wordpress menu.

  2. You can reserve some space above:

    body.admin-bar {
        .navbar-fixed-top {
            // reserve space for the admin bar
            top: 32px !important;
        }
    }
    

Comments are closed.