Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to hide menu from WordPress admin panel

    • 0
    • 1
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 314
    Comment on it

    Sometimes, we see that the clients who do not have any technical knowledge messups with WordPress settings after logging with WordPress admin panel. We can hide the menu from wordpress admin panel by which the client can only see some menu/options in the backend/admin panel which is necessary for him to change the website content.

    We can hide the menu from admin panel without using any WordPress plugin. We can hide the menu by writing some code in theme's functions.php. This code will hide the options that are not necessary.

    <?php 
        function remove_menus(){
          remove_menu_page( 'index.php' );                  //Dashboard
          remove_menu_page( 'edit.php' );                   //Posts
          remove_menu_page( 'upload.php' );                 //Media
          remove_menu_page( 'edit.php?post_type=page' );    //Pages
          remove_menu_page( 'edit-comments.php' );          //Comments
          remove_menu_page( 'themes.php' );                 //Appearance
          remove_menu_page( 'plugins.php' );                //Plugins
          remove_menu_page( 'users.php' );                  //Users
          remove_menu_page( 'tools.php' );                  //Tools
          remove_menu&amp;_page( 'options-general.php' );        //Settings
        }
        add_action( 'admin_menu', 'remove_menus' );
        ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: