/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function remove_dashboard_widgets() { global $menu,$submenu; global $current_user; get_currentuserinfo(); if ($current_user->ID != 1) { // only admin sees the whole thing // $menu and $submenu will return fo all menu and submenu list in admin panel . $menu[2] = ""; //Dashboard $menu[5] = ""; // Posts $menu[15] = ""; //Links $menu[25] = ""; //Comments $menu[65] = ""; //Plugins } } add_action('admin_head', 'remove_dashboard_widgets'); ?>
Comments
