Created
May 20, 2014 17:48
-
-
Save lschatzkin/3405ede11c1c0f6b3c3f to your computer and use it in GitHub Desktop.
WordPress: Hide content-box on specific pages in admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_editor() { | |
if (isset($_GET['post'])) { | |
$id = $_GET['post']; | |
$template = get_post_meta($id, '_wp_page_template', true); | |
if($template == 'template_name.php'){ | |
remove_post_type_support( 'page', 'editor' ); | |
} | |
} | |
} | |
add_action('init', 'remove_editor'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment