If you have a membership-based website and don't want the admin bar at the top of the page, use this action to remove it.
Copy and paste the WordPress function into your theme's functions.php
file or, if you sensibly have one installed, your custom functions plugin.
1
<?php
2
/*
3
Disable admin bar on the front-end of your website for subscribers.
4
http://www.beliefmedia.com/code/wp-snippets/disable-admin-bar
5
*/
6
7
8
9
add_filter('show_admin_bar', '__return_false');
10
}
11
}
12