Wordpress - Edit Box Remover

Asked

Viewed 142 times

0

It may seem strange, but I need to find a way to remove the main Wordpress text box.

inserir a descrição da imagem aqui

1 answer

0


If you are modifying native post types (post or page), you can do so 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 is a Custom Post Type that you created, at the time of creating the CPT you can pass like this:

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

register_post_type( 'nome', $args );

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

ref: register_post_type()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.