Custom post types and taxonomies can be registered using register_post_type()
and register_taxonomy()
. These functions do not actually create any data in the database. Data is added when users populate content (posts and taxonomies).
When a plugin is disabled, any post types and taxonomies that it registers will be unregistered, but all of their data in the database will remain in place.
If you are going to remove data from the database, you should make it abundantly clear to the user what is happening. One common pattern is to require the user to click an option that states that they want data to be deleted when deleting the plugin. The data deletion process can be run using the register_uninstall_hook()
or uninstall.php
file. Data should not be removed when simply deactivating a plugin.
Related Posts:
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to completely disable a taxonomy archive on the frontend?
- register_taxonomy with multiple object type and update_count_callback
- Custom Taxonomy and tax_query Issue?
- How to List Thumbnails based on Custom Categories
- Custom Taxonomy Not Showing in Menu
- Set object terms not working on plugin activation
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- get_object_taxonomies() returns empty array for custom post type
- Adding a custom post type taxonomy template in plugin
- How to add a custom taxonomy to show up in a custom post type menu?
- What is the best practice for displaying my plugin content in themes?
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Plugin fatal error
- Custom post type’s extra fields – how to handle?
- Main query not querying any posts in custom taxonomy template
- Dynamically insert code to custom post type loop
- Show current custom taxonomy
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Writing a custom Glossary plugin
- Custom post type page with parameter
- Custom post type category link redirecting to 404 page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Error 404 change permalink term custom term taxonomy
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Changing CPT permalink
- I have a random letter appearing before my content. Where to start looking for the cause?
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Insert custom taxonomy into category query
- % encoded URL giving 404 error in WordPress
- Which File Populating CPTs in Slug URL
- Not Able to List CPT Based on Taxonomy Term
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Associate custom categories to different user IDs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Render custom taxonomy query as single template
- Custom Taxonomy Showing in WP Menu
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in Custom post type?
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Custom Post Type urls not working
- How to filter custom post data with AJAX?
- Make term slugs of custom taxonomy available in WP REST API for custom post type?
- Use different taxonomies in different custom post types’ permalinks?
- Should I use custom taxonomy or custom post type
- Podcast Guest List
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- How do I create filters for custom post types?
- Set menu active state for custom posttype and category, given custom taxonomy term
- custom permalinks based on taxonomies for custom post type
- Archive page for taxonomy terms
- Custom Taxonomy Invalid in REST API
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Hook to override title, image and content
- How do I get array of types associated with a taxonomy?
- Insert Multiple Post with Same Publish Button
- get_post_meta returns empty array for terms
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- Display CPT posts based on specific taxonomy
- Remove standard meta boxes from custom taxonomy
- Custom template won’t load for a custom post type (custom permalinks used)
- How to display selected taxonomies by their parent
- List Post Title by Last Word Then Second Last
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Custom Field Order by Last Name and First Name
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- shortcode to show custom post types by category
- Single Template that can be applied only via URL
- get_posts of Custom Post Type AND Custom Taxonomy
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- Custom taxonomy in URL showing 404
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Custom taxonomy in custom post RSS feed
- Display all posts in main category and 1 subcategory
- How to display product subcategories into my custom post type single page
- I have 2 post types i need to show the post type contents in 2 select boxes [closed]
- Display Recently Added Custom Post Types with Custom Taxonomy Shortcode
- Update post terms with custom taxonomy
- How do I display tags for a custom post type single page?
- Am unable to reset a query properly
- How to use the post_title of custom post type as taxonomy
- WordPress theme custom capabilities not works
- Custom Taxonomy URL are redirecting to page with the same name
- custom post type not showing in menu
- Custom posts don’t work
- Query/list all terms and their custom post count
- Custom Post Type Archive Page Filtering
- Root slug of taxonomy returning 404
- How to bulk copy custom fields between custom posts?
- get_attached_media() on author page not working
- Remove url rewrites for registered taxonomies
- Received nothing after executing AJAX post function
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Filtering WP_Query Dynamically on the Front-End
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?