I am using the simple fields plugin to provide additional rich text editors and have no need for this ‘main’ text editor box on any of my ‘page’s
I have tried the following code in my functions.php:
function my_remove_meta_boxes() {
remove_meta_box('postdivrich','page','normal');
}
add_action( 'admin_menu', 'my_remove_meta_boxes' );
Apparently this will not work since it is not actually a meta box…
I suppose I could sneak some jQuery in somewhere: ('#postdivrich').hide() but I am not really sure where to put it, and suspect that there is a better way.
Any help would be greatly appreciated
Edit: this question describes how to do what I want, but for a custom post type. Can I apply this same technique to ‘pages’ somehow?
Edit 2: Using noob power I made something work, but for all post-types and with it flashing on screen before being hidden. I skipped JQuery and went straight for plain ole JS:
//REMOVE MAIN TEXT CONTENT BOX FOR PAGES
function removeMainTxtContent(){
echo '<script>window.onload=function(){document.getElementById("postdivrich").style.display="none";}</script>';
}add_action('admin_head', 'removeMainTxtContent');
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
function remove_pages_editor(){
remove_post_type_support( 'page', 'editor' );
}
add_action( 'init', 'remove_pages_editor' );
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0