Anyone know of a way to deregister custom post types ?
Is there an equivalent to register_post_type() ?
|
Anyone know of a way to deregister custom post types ? Is there an equivalent to register_post_type() ? |
|||
|
|
|
There's not currently an See the code provided by Nacin here. I've no idea how WordPress will react to a built-in post type being unregistered, so do so at your own risk.. for custom post types it should be fine, simply saying that unregistering a built-in post type may have odd effects on the installation (if you were to do so). |
|||||||||||||||
|
|
As t31os noted it is easy to remove post type from global variable. But if you mean non-core post type then it would be better to lookup code that registers it and unhook with |
|||||
|
|
This worked for me, like Rarst said using the remove_action() if possible.
|
||||
|
|