Last active
June 14, 2016 06:51
-
-
Save offroadkev/360d88d3503c186ef1651c0d3ecc2c5b to your computer and use it in GitHub Desktop.
Hide WP Editor For Specific Page Edit Screens
This file contains hidden or 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
<?php | |
/* | |
* Hide WP Editor for Specific Page IDs | |
* Note: I really should update this to be by page template | |
*/ | |
function hide_native_wysiwyg_editor() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; // Get post ID | |
if( !isset( $post_id ) ) return; | |
if( $post_id == '17' || $post_id == '33') { // add page ID's | |
remove_post_type_support('page', 'editor'); | |
} | |
} | |
add_action( 'admin_init', 'hide_native_wysiwyg_editor' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment