• 1.
    add_action( 'add_meta_boxes', 'hhs_add_meta_boxes', 10, 2 );
  • 2.
    function hhs_add_meta_boxes( $post_type, $post ) {
  • 3.
    	$posts_page = get_option( 'page_for_posts' );
  • 4.
     
  • 5.
    	if ( $post->ID === $posts_page ) {
  • 6.
    		// remove the editor
  • 7.
    		remove_post_type_support( 'page', 'editor' );
  • 8.
    	}
  • 9.
    }
add_action( 'add_meta_boxes', 'hhs_add_meta_boxes', 10, 2 ); function hhs_add_meta_boxes( $post_type, $post ) { $posts_page = get_option( 'page_for_posts' ); if ( $post->ID === $posts_page ) { // remove the editor remove_post_type_support( 'page', 'editor' ); } }

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter