views:

645

answers:

3

Hi,

I am trying to remove custom fields section from Wordpress backend. I think I found a function that display custom fields. The function is located in wp-admin/edit-page-form.php line 181.

do_meta_boxes('page','normal',$post)

when I remove the function, Wordpress does not display other boxes as well.

How do I remove a particular box from Wordpress backend?

+2  A: 

You're changing core files, which is not good idea when it comes to upgrades and the end-user. Go to "Screen Options" and untick "Custom Fields," or use a plugin http://wordpress.org/extend/plugins/custom-write-panel/ to hide editor panels. Or, check the plugin for the code you need to disable each editor option without using the plugin.

songdogtech
A: 

You can most easily do this by editing the CSS for the individual box within the admin. First method that comes to mind would be to add the following to your theme's functions.php file.

<?php
add_action('wp_head','hide_custom_fields_postbox');

function hide_custom_fields_postbox()
{
  if ( is_admin() ) {
  ?>
  <style type="text/css">
  div#postcustom {display:none;}
  </style>
  <?php
  }
}//end function
?>
manifestphil