[wp-hackers] Removing a Post Type Completely

Spencer spencer.gurnk at gmail.com
Thu Jul 29 17:02:40 UTC 2010


Is there a proper way of completely removing a post type? I have

	if( isset( $wp_post_types[ 'post' ] ) )
		unset( $wp_post_types[ 'post'] );

which seems to remove the support, but the menu still shows the links
for posts, so I have to unset the menu item with the 'admin_menu'
action. After that, I register the new post type.

Is there a better way? I couldn't find a remove_post_type() function,
or anything similar. Just remove_post_type_support() to remove certain
aspects of it.


More information about the wp-hackers mailing list