Piece of code that I use regularly to unregister a WordPress post type. Just add/edit/remove the post type from lines 3, 4 and 5 and paste in your functions.php file.
Unregister WordPress Post Types
Download Plugin Zip View on GitHub
<?php
function well_delete_post_type(){
unregister_post_type( 'portfolio' );
unregister_post_type( 'cms_block' );
unregister_post_type( 'uncode_gallery' );
}
add_action('init','well_delete_post_type');
Leave a Comment