Remove WordPress Admin Bar?CSS
Read the full article at: Remove WordPress Admin BarCSS A version or two back, WordPress decided to add a toolbar for logged in users on the display side thats about the sites theme. ?I get why they did it but its an annoyance to me I dont
Read the full article at: Remove WordPress Admin Bar CSS
A version or two back, WordPress decided to add a toolbar for logged in users on the display side that’s about the site’s theme. ?I get why they did it but it’s an annoyance to me — I don’t care to see it. ?To accomplish this task, WordPress injects the following into?every page:
#wpadminbar { display:none; } html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } }
Bleh. ?You can remove this CSS and the admin bar using the following code which should be placed with your functions.php
file:
add_action('get_header', 'remove_admin_login_header'); function remove_admin_login_header() { remove_action('wp_head', '_admin_bar_bump_cb'); }
Use it. ?You’re welcome.
下一篇: auth管理后台