How to remove menus from the admin sidebar

 In Wordpress Admin

The following code will disable left sidebar menus on the admin area (for all the users).

The following code will disable the menus  for one specific user.

 

where “username” is the user that you want to restrict. You can also put “if($current_user->user_login != ‘admin’)” to apply these restrictions to all the users excluding “admin” .

Nuno Sarmento
I am full-stack WordPress developer based in London with a wealth of theme development and support experience. I am great at problem solving and developing quick solutions. I specialise in custom WordPress theme development and bug fixing.
Recent Posts

Leave a Comment

Start typing and press Enter to search