Site icon Hip-Hop Website Design and Development

Take away annoying WP Adminbar CSS

I’m making an attempt to take away the annoying WP Admin bar css.

<fashion sort="textual content/css" media="display">
html { margin-top: 32px !vital; }
* html physique { margin-top: 32px !vital; }
@media display and ( max-width: 782px ) {
    html { margin-top: 46px !vital; }
    * html physique { margin-top: 46px !vital; }
}
</fashion>

I’ve tried (in response to different OLD solutions):

/**
 * Take away admin bar CSS
 */

  perform remove_admin_login_header() {
      remove_action('wp_head', '_admin_bar_bump_cb');
  }
  add_action('get_header', 'remove_admin_login_header');

It doesn’t work.