How can I unregister/delete custom post types?

The admin menu is crowded with things I don't need, like: Slides, Portfolio, Offers, Clients, etc. I want to remove it all. What do I need to add to my functions.php to make this work?

I've tried:

function delete_post_type(){
    unregister_post_type( 'client' );
}
add_action('init','delete_post_type');

but this doesn't work.

Comments

Sign In or Register to comment.