I have some clients that are going to be using wordpress for their sites. I created custom fields for them to input data in so they don't have to use the editor. How do I hide the page editor completely? I want it completely hidden so they don't accidentally muck things up. Thanks!
2 Answers
For posts:
add_action('init', 'my_custom_init');
function my_custom_init() {
remove_post_type_support( 'post', 'editor' );
}
See Codex. For custom post types that you register, you can specify what 'features' it supports when you register it it use the 'supports' arguments.
For custom post types that are not registered by you can use the above with 'post' replaced by the custom post type name.
Here is an alternative, rather than removing the editors, they are simply hidden from use for anyone who is not an Administrator.
I prefer hiding, rather than removing. I'm sure there are cases for both.
//Hide New Post Options from all except Administrator
function hide_post_page_options()
{
if ( !current_user_can( 'administrator' ) )
return;
$hide_post_options = '<style type="text/css"> .postarea { display: none; }</style>';
print($hide_post_options);
}
add_action( 'admin_head-post-new.php', 'hide_post_page_options' );