Anyone know of a way to deregister custom post types?
Is there an equivalent to register_post_type()
?
As of WordPress 4.5 there is function to do that, unregister_post_type
. Example:-
function delete_post_type(){
unregister_post_type( 'blocks' );
}
add_action('init','delete_post_type');