This simple snippet of code removes the WordPress admin bar from the top of your screen and eliminates the extra space (the margin) that’s usually taken up by the bar. This can be handy for those who prefer a minimalist workspace in WordPress
function ts_remove_admin_header_css() { echo '<style> #wpadminbar { display: none; } #wpcontent { margin-top: 0 !important; } </style>'; } add_action('admin_head', 'ts_remove_admin_header_css');