You can do it by hooking admin_init action:
- First, you can create a option to select the page you create for your plugin. I suppose that the option will be save in
wp_options
table with nameyour_plugin_special_page
. -
Remove editor support on that page with this action.
add_action( 'admin_init', 'your_plugin_hide_editor' ); function your_plugin_hide_editor() { // Get the Post ID if ( isset( $_GET[ 'post' ] ) ) { $post_id = $_GET[ 'post' ]; } elseif ( isset( $_POST[ 'post_ID' ] ) ) { $post_id = $_POST[ 'post_ID' ]; } if ( !isset( $post_id ) ) { return; } // Remove editor support if ( get_option('your_plugin_speical_page') == $page_id ) { remove_post_type_support( 'page', 'editor' ); } }
-
Then you can use admin notices to display your message to user (https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices)
Hope this help!