Remove native meta boxes


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

Remove/unset native meta boxes


Copy this code and paste it in your HTML
  1. function remove_meta_boxes() {
  2. // posts
  3. remove_meta_box('postcustom','post','normal');
  4. remove_meta_box('trackbacksdiv','post','normal');
  5. remove_meta_box('commentstatusdiv','post','normal');
  6. remove_meta_box('commentsdiv','post','normal');
  7. remove_meta_box('categorydiv','post','normal');
  8. remove_meta_box('tagsdiv-post_tag','post','normal');
  9. remove_meta_box('slugdiv','post','normal');
  10. remove_meta_box('authordiv','post','normal');
  11. // pages
  12. remove_meta_box('postcustom','page','normal');
  13. remove_meta_box('commentstatusdiv','page','normal');
  14. remove_meta_box('trackbacksdiv','page','normal');
  15. remove_meta_box('commentsdiv','page','normal');
  16. remove_meta_box('slugdiv','page','normal');
  17. remove_meta_box('authordiv','page','normal');
  18. }
  19. add_action('admin_init','remove_meta_boxes');
  20. /* REMOVE SUBMENUS */
  21. //function adjust_the_wp_menu() {
  22. //$page = remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=post_tag' );
  23. //}
  24. //add_action('admin_menu', 'adjust_the_wp_menu', 999);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.