-
-
Save wpsmith/3875217 to your computer and use it in GitHub Desktop.
disable wysiwyg on specific page ID
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
add_action( 'admin_init', 'wps_hide_editor' ); | |
/** | |
* Remove the editor for a specific post. | |
* | |
* @return null Returns early for non-admin and other admin pages. | |
*/ | |
function wps_hide_editor() { | |
$post_id = isset( $_GET['post'] ) ? $_GET['post'] : $_POST['post_ID'] ; | |
if( ! isset( $post_id ) || ! is_admin() ) return; | |
if ( 25 == $post_id ) | |
remove_post_type_support( 'page', 'editor' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment