Skip to content

Instantly share code, notes, and snippets.

@kjantzer
Last active May 29, 2019 19:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kjantzer/e3f3524b22511f882497 to your computer and use it in GitHub Desktop.
Save kjantzer/e3f3524b22511f882497 to your computer and use it in GitHub Desktop.
Globally remove default WordPress Admin Header. Courtesy of David Walsh (http://davidwalsh.name/remove-wordpress-admin-bar-css)
add_action('get_header', 'remove_admin_login_header');
function remove_admin_login_header() {
remove_action('wp_head', '_admin_bar_bump_cb');
}
@Flimm
Copy link

Flimm commented May 29, 2019

Or you could put this in functions.php:

show_admin_bar(false);

This takes care of getting rid of the CSS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment