Disable the admin bar / probleme with responsive menu

This is a hack and a half, but it does achieve the desired effect.

What this code does is add inline css to the header in admin pages, over 780px width the admin bar is hidden, under that and its shown. So you in effect hide it on desktop and show it on mobile.

Add this to your functions.php file.

add_action('admin_head', 'hide_admin_bar');
function hide_admin_bar() {
     echo '<style>
          @media all and (min-width:780px) {
               #wpadminbar {
                display:none;
           } 
               html.wp-toolbar {
                padding-top:0px;
               }
          } 
      </style>';
}