Home / admin / Disable the help menu for admin only
  • How to Disable the help menu for admin only

    disable-te-help-menu-for-admin-only

    Adding this snippet to the functions.php of your wordpress theme will display the help menu for the admin only.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    function hide_help() {
        if(is_admin()){
        echo '<style type="text/css">
                #contextual-help-link-wrap { display: none !important; }
              </style>';
        }
    }
    add_action('admin_head', 'hide_help');
    

    ( WordPress codex functions, hooks, in this snippet. )

    admin_head, add_action, is_admin,
  • Fg

    Not workind

    • Hi fg, are you sure you added this to the functions.php correctly as it only adds some CSS to the header of the admin section for non admins to hide the menu.

    • Anonymous

       is_admin() is a check for whether the current page is an admin page, not what permissions a user has. Instead, try using the current_user_can() function, such as current_user_can(‘administrator’). (documentation at http://codex.wordpress.org/Function_Reference/current_user_can)

  • Raozkardes

    wp3.3.1 dont working!

  • GeekPress

    delete the ! before is_admin 😉

  • It work well! Thank you.

  • Paulo

    Doesn´t work in 4.2.2

    • fixed the issue should have no problem now.

      • Paulo

        Thanks. It works fine now