Support » Fixing WordPress » How to remove the "Header" sub-menu item from my Admin. Panel.

  • Resolved sandra408

    (@sandra408)


    Hi does anyone know how to remove the “Header” sub-menu item from my Admin. Panel? The code that I tried to use did not work…
    functions.php file:

    function remove_submenus() {
    global $submenu;
    unset($submenu['admin-header.php'][2]); // Removes 'Header'.
    }
    add_action('admin_menu', 'remove_submenus');

    [Please post code snippets between backticks or use the code button.]

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove the "Header" sub-menu item from my Admin. Panel.’ is closed to new replies.