Currently there is no way on the backend (UI) for unregistering a post type, the
process however is quite simple.
Andrew Nacin provided some code over on https://core.trac.wordpress.org/ticket/14761
You can easily create a plugin with this function and have the CPT unregister.
if ( ! function_exists( 'unregister_post_type' ) ) :
function unregister_post_type( $post_type ) {
global $wp_post_types;
if ( isset( $wp_post_types[ $post_type ] ) ) {
unset( $wp_post_types[ $post_type ] );
return true;
}
return false;
}
endif;
Related Posts:
- What does this PHP function code mean? [closed]
- Restrict custom post type to only site administrator role
- Linking Two Post Types
- How to force one column layout on custom post type edit page?
- modify all posts of a category to “no comments allowed”
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Showing current taxonomy terms
- automatically create taxonomy with same name as post title
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Custom Post Type by user
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- [Plugin: Posts 2 Posts] Changing display order of connections
- Remove POST_TYPE from custom post type permalink
- same archive template for different custom post
- Get all posts WHERE custom_field is LIKE value
- Get the post children count of a post
- How to delete all posts from a custom post type?
- Best practice for adding posts in bulk
- Check Title Unique Or Not and If not error message and dont save
- Remove All, Published and Trashed Post Views in Custom Post Type
- Custom Post Type | Fatal Error on register_post_type()
- How to post twitter like updates on wordpress
- Show Two custom Post type and their posts on category page
- apply filters only to specific post listing without check the url parameters
- Custom post type and body_class: Remove “blog” class
- Deleting Custom Post type data using mySQL command
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- If post has custom field then display css-class
- Display only one post each WEEK
- List custom taxonomy specific to one custom post type
- Meta query for custom post type ignored in main query
- Show titles, date of all posts on single category page
- Update postmeta Parent when post_status child change
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- Allow users to create posts without logging in?
- How to sort posts in a custom post type by title in ascending order by default?
- Redirect to another page using contact form 7? [closed]
- How can I have different content for different countries?
- Get_the_terms restrict output
- Custom post type menu
- Custom post type’s posts are not showing anywere but in xml sitemap
- YOAST SEO won’t work on custom post type archive [closed]
- Separate Content from gallery (custom post type)
- Modify Posts from Custom_Post_Type within the plugin
- WordPress Count posts within a custom post type
- Add custom columns in custom post type browse page
- Send post changes to set email addresses (not users or subscribers)
- Custom post type tags not showing in search
- How set template for “custom post type” individual post
- Why is my custom post content only viewable when signed into WordPress?
- Adding specific custom fields (images) to post excerpt
- Add input radio menu to post
- Limit posts per page depending on the size of a div?
- Delete Post by User
- Link two different post using there post_id in post meta
- Post that populates itself (almost) automatically using data from imported excel file
- creating a custom post template
- Problem to get the link of the default ‘post’ post type like the orther custom types
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- One Post with different content, depending on a Page
- Custom Post Type
- Display all post types together
- Add Excerpt On Quicksand Plugin
- Turn post into simple slideshow
- Query multiple post of which one by taxonomy
- How to make a template for a specific post of a custom post type?
- How to hide home title on pages and posts?
- How to create a job post by email parsing? [closed]
- show posts under custom post type with same autj
- How to automate the creation of advanced layout article/post
- display posts, pages and custom post types from another wordpress site
- is therer any wordpress function to retrieve a specific html element from post content
- How to develop Knowledge center in WordPress Website
- How to add custom content template part for a custom post type on main query using a plugin
- Correct way to use a form to to filter custom posts by taxonomy terms?
- Loop on front-page.php
- Output HTML only on individual post view
- Custom posts don’t work
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- Is it possible to create relational metabox values in a custom post?
- Custom Post Type Query for Sidebar Doesn’t Work on Front Page
- Changing custom type name hides the posts
- Two Custom Post Types Many to Many Relationship
- Problem with displaying posts in the CPT category
- Custom Post Type slug same as page name
- Detect inside a custom query the kind of post type to assign custom classes
- WP_Query with custom post type ID
- How to Create a Separate Page for Blog Posts in WordPress
- Override Plugin Custom Post Type ‘single’ view
- How can i summerize posts or news automatically in word press site?
- Why doesnt my tag page populate with this custom post type?
- How to change Elementor Template for Single Page Post on Load
- Permalink URL connection between two custom types
- How to display custom post type in a submenu?
- Custom Post Types and Posts are mixed
- Get data from custom post type to another custom post type?
- Using get_terms() as shortcode attribute
- the_content() stop images being pulled through