How to Enable the WordPress Admin Bar only for admins
Md Abul Bashar | 1,973 views | December 23, 2015 | Tips And Tricks | No | 7:20 PM |
Hi today i will tech you how to Enable the WordPress Admin Bar only for admins , without plugin.
go to your active theme folder then open your functions.php page on any editor, like: notepad++ and past this code in functions.php.
If the user can not manage options, then do not show them the admin bar.
/* * Enable the WordPress Admin Bar only for admins */ if ( !current_user_can( 'manage_options' ) ) { remove_action( 'init', '_wp_admin_bar_init' ); }
You have to enjoy this articel? Don't forget subscribes this site.
If you want to get our update article, then please subscribe this site.
This title last post
1,973 views | December 23, 2015 | 7:20 PM