Advertisement
vapvarun

Disable BuddyPress Admin Bar

Jan 4th, 2018
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. //hide admin bar
  2. add_action( 'init', 'remove_admin_bar_user', 10001 );
  3. function remove_admin_bar_user() {
  4.  
  5.     if ( current_user_can( 'administrator' ) || is_admin() ) {
  6.  
  7.         show_admin_bar( true );
  8.     } else {
  9.         show_admin_bar( false );
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement