Wordpress - Remove edit box

0

It may seem strange, but I need to figure out how to remove the main Wordpress text box.

    
asked by anonymous 14.12.2016 / 01:02

1 answer

0

If you are modifying the native post types (post or page), you can do this in your file functions.php

add_action( 'init', 'retira_editor' );

function retira_editor() {
    remove_post_type_support( 'post', 'editor' );
    remove_post_type_support( 'page', 'editor' );
}

ref: remove_post_type_support ()

If it's a Custom Post Type you created, at the time you created the CPT you could go like this:

$args = array(
    'labels' => $labels,
    /* omiti os outros parâmetros */
    'supports' => array( 'title' ),
);

register_post_type( 'nome', $args );

Doing so, the post of type "name" will only have the title.

ref: register_post_type ()

    
14.12.2016 / 05:33