Posted By

prwhitehead on 04/16/11


Tagged

edit php wordpress box meta


Versions (?)

Wordpress: Remove page / post meta boxes


 / Published in: PHP
 

To remove some of the lesser used edit post / page meta boxes:

  1. /**
  2. * Add to your functions.php
  3. * to hide meta boxes just uncomment the line
  4. *
  5. */
  6.  
  7. function customize_meta_boxes() {
  8. $array = array(
  9. 'slugdiv',
  10. 'postexcerpt',
  11. 'passworddiv',
  12. 'categorydiv',
  13. 'tagsdiv',
  14. 'trackbacksdiv',
  15. 'commentstatusdiv',
  16. 'commentsdiv',
  17. 'authordiv',
  18. 'revisionsdiv',
  19. 'postcustom'
  20. );
  21.  
  22. foreach ($array as $box)
  23. {
  24. remove_meta_box($box,'post','normal');
  25. remove_meta_box($box,'page','normal');
  26. }
  27. }
  28. add_action('admin_init', 'customize_meta_boxes');

Report this snippet  

You need to login to post a comment.