Created
October 13, 2016 09:05
-
-
Save joshuacharleslake/8fd9b17165e618cbc830680083a938a5 to your computer and use it in GitHub Desktop.
Remove default wordpress wysiwyg editor on certain pages.
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
//Remove Content Box From Homepage | |
function remove_editor_init() { | |
if ( is_admin() ) { | |
$post_id = 0; | |
if(isset($_GET['post'])) $post_id = $_GET['post']; | |
$posts_without_wysiwyg = array(2, 226); | |
if ( in_array($post_id, $posts_without_wysiwyg)) { | |
remove_post_type_support('page', 'editor'); | |
} | |
} | |
} | |
add_action( 'init', 'remove_editor_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment