WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A few months ago I asked a similar question: Is it possible to remove the main rich Text box editor? and got the following answer:

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

This code removes the editor from all pages. Can I remove if from specific pages (by post-ID) somehow? Thanks!

share|improve this question
up vote 3 down vote accepted

There is an add_meta_boxes function that fires that you can hook into - it fires whenever the edit post page is rendered.

At that point, you can get the ID of the post being edited using get_the_ID(). You can then compare it to the ID for which you want to remove the post editor:

function remove_pages_editor(){
    if(get_the_ID() == 23) {
        remove_post_type_support( 'post', 'editor' );
    } // end if
} // end remove_pages_editor
add_action( 'add_meta_boxes', 'remove_pages_editor' );
share|improve this answer
Thanks Tom! I cannot test it quite yet - since 1&1 just broke my site (...unfortunate to inform you that you are one of the affected customers that is why your website is showing "forbidden" and cannot see any of the dirctories from the root...) I'll assume it works and give ya the check. – Zach Lysobey Feb 24 '12 at 18:10
works great, thanks! – Zach Lysobey Mar 9 '12 at 16:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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