Created
October 25, 2014 03:36
-
-
Save martynchamberlin/7bd8c368a1bcbc2eb813 to your computer and use it in GitHub Desktop.
Remove WPAdmin Bar in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* By default you can rmeove a single user's admin bar in WordPress. | |
* That's cool but the problem of course is that you have to do this | |
* for every single user. If you are using software like Wishlist | |
* Member where new users are being added all the time, this is bad. | |
* The solution is to programmatically remove the admin bar accross | |
* the board. I've experimented doing this several ways and this is | |
* the best one in my expereince. | |
*/ | |
jQuery(document).ready(function( $ ) | |
{ | |
$('#wpadminbar').remove(); | |
$('html').attr( 'style', 'margin-top: 0!important' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment