If you want to remove the default editing area from specific pages or posts in the admin area here is how to do it.

Put the following in your functions.php file:

// ---- Hide default editor

add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
if( !isset( $post_id ) ) return;
// Hide the editor on a specific page based on title. Replace PAGENAME with your page
$homepgname = get_the_title($post_id);
if($homepgname == 'PAGENAME'){
remove_post_type_support('page', 'editor');
// Hide the editor on a page with a specific page template. Replace template-filename-here.php with your page template filename
// Get the name of the Page Template file.
$template_file = get_post_meta($post_id, '_wp_page_template', true);
if($template_file == 'template-filename-here.php'){ // the filename of the page template
remove_post_type_support('page', 'editor');

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP