Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //* Add this to your functions.php file. Do NOT include the opening php tag
- //* Hide the admin bar from anyone who can't edit posts
- add_action('set_current_user', 'ab_hide_admin_bar');
- function ab_hide_admin_bar() {
- if (!current_user_can('edit_posts')) {
- show_admin_bar(false);
- }
- }
Add Comment
Please, Sign In to add comment