web analytics

Hide wordpress Admin Bar

Admin Bar hiding is very simple. Easily we can hide this using a Hook add_filter( ‘show_admin_bar’, ‘__return_false’ ).

function disable_admin_bar() {

add_filter( 'show_admin_bar', '__return_false' );
if ( ! is_admin()){
if($uid >1) add_action( 'init', 'disable_admin_bar', 1 );

These above code paste into function.php , There is a condition for admin user, if user is admin then it is showing, but other user can’t show the admin menu.

Bivash Kanti Pal

Hi guys, This is the place where developers are sharing there thoughts....

Leave a Reply

Your email address will not be published. Required fields are marked *

Result of *Captcha loading...

Do NOT follow this link or you will be banned from the site!