Remove menu items from WordPress admin panel/dashboard


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. add_action( 'admin_menu', 'remove_links_menu' );
  2. function remove_links_menu() {
  3. remove_menu_page('index.php'); // Dashboard
  4. remove_menu_page('edit.php'); // Posts
  5. remove_menu_page('upload.php'); // Media
  6. remove_menu_page('link-manager.php'); // Links
  7. remove_menu_page('edit.php?post_type=page'); // Pages
  8. remove_menu_page('edit-comments.php'); // Comments
  9. remove_menu_page('themes.php'); // Appearance
  10. remove_menu_page('plugins.php'); // Plugins
  11. remove_menu_page('users.php'); // Users
  12. remove_menu_page('tools.php'); // Tools
  13. remove_menu_page('options-general.php'); // Settings
  14. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.