How should I completely disable the visual and html editor from pages? I know I can disable the visual editor in my profile, but I am trying to lock down the content input areas so that my client doesn't muck things up.

  • I would be interested in learning why you'd lock the content and not educate your client? After all idea with WordPress site is that client is able to update their content. Commented Jun 26, 2011 at 22:53
  • 2
    Everything is split into custom meta boxes, so really the editor is just getting in the way. Everything is in meta boxes to keep a decent structure to the page. Really it's not worth going into here, but trust me this is the best way for this particular site.
    – Tom
    Commented Jun 26, 2011 at 23:23

2 Answers 2


Why not use custom post types and don't add any support for the editor, that is afterall what they are for and the easiest way . The answer in this post covers how to do that,

Hide content box with Custom Post Type?

To remove that functionality for pages or posts (and custom types) you can try and use remove_post_type_support . For pages;

add_action('init', 'my_remove_editor_from_post_type');
function my_remove_editor_from_post_type() {
    remove_post_type_support( 'page', 'editor' );

Ref: http://codex.wordpress.org/Function_Reference/remove_post_type_support

A hacky solution is to use CSS display:none; for the #editorcontainer or one of the sub id or classes. You can also then enqueue that style only for particular users.


Think this might be what your looking for, code and more info from wpsnipp:

add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') );
add_action( 'admin_head', 'disable_html_editor_wps' );
function disable_html_editor_wps() {
global $current_user;
if ($current_user_can('manage_options') {
    echo '<style type="text/css">#editor-toolbar #edButtonHTML, #quicktags {display: none;}</style>';

i've altered it from using user levels to using if ($current_user_can('manage_options') { so this should remove it for everybody but admin, code needs to gi in your themes functions.php

  • 1
    Why not simply take current_user_can( 'manage_options' );? Jes, there's a function for each & everything ;)
    – kaiser
    Commented Jun 26, 2011 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.