Remove post-type Wordpress articles

Asked

Viewed 108 times

0

Remove

I would like to remove the post-type Articles from the Wordpress menu I have researched some possibilities but nothing has taken effect.

inserir a descrição da imagem aqui

I tried creating the method unregister_post_type in this way:

function unregister_post_type( $post_type ) {
    global $wp_post_types;
    if ( isset( $wp_post_types[ $post_type ] ) ) {
        unset( $wp_post_types[ $post_type ] );
        return true;
    }
    return false;
}

2 answers

2


  • Glad you could help, man.

1

The post_type articles actually refers to the standard post_type Wordpress "posts". I find it very difficult that you can "deregister" and get away with it, because they are the basis on which the whole system was created. Probably the sky will fall on your head and a hole will open in the ground...(Joke...)

If you want to remove the menu there is a much simpler way to do that which is, well, remove the menu:

remove_menu_page( 'edit.php' );

Ready! The menu is gone and the sky is still in place...

Browser other questions tagged

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