In this specific case it is better to have some handling of bad configuration than trying to prevent it from happening, as there are just too many possible ways in which it can happen without coming from the post edit page. Short list that comes to my mind right now
- quick edit from the post list
- bulk update from the post list
- any plugin that may combine terms
- remote publishing via xml-rpc or the rest api
Blocking the save, especially for users that do not use the post edit screen, is going to end in bad UX as the user will not know why the save fails.
Related Posts:
- get_query_var() not working in pre_get_posts
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- In child theme, add CPT to custom taxonomy registered in parent theme
- Store a value in global scope after init hook is fired
- Changing CPT permalink
- How to Add Custom Taxonomy To Woocommerce Plugin
- Exclude a category from WP_Query
- Check if post type has term
- Custom taxonomy not showing up when adding a new custom post type
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- WordPress custom taxonomy URL rewrite on spelling errors
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Create an archive page for custom taxonomies
- Rewrite permalinks for custom posttype and custom taxonomy
- How to check if last uri segment is a custom post type or taxonomy term?
- Categories under custom post types doesn’t show properly
- Sort the main query in subcategories/terms?
- Highlight nav menu terms
- Custom Post Types, Custom Taxonomies and Permalinks ?
- get a list of posts from Custom Taxonomy
- Trying to manage templates on a blog with lots of custom taxonomies
- How to register custom post types in a plugin?
- Display Custom Category (taxonomy) Name in Custom Post Type
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Custom post type and taxonomy permalinks – Structure
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- Custom Post Types relationships
- How many Custom Post Types to register?
- How can i skip same post from taxonomy term?
- Set menu active state for custom posttype and category, given custom taxonomy term
- How to bulk copy custom fields between custom posts?
- get_attached_media() on author page not working
- Posts are duplicating on wp_post_update
- Custom post type structure for posts with multiple child posts
- Search / Filter posts on Title/Content OR Tags
- How to display custom taxonomies with links in filter menu?
- List custom taxonomy specific to one custom post type
- Hide parent categories when clicked, and show it’s childs
- Get unique superset of taxonomy terms from a list of custom posts in another hierarchical taxonomy
- I want to change the word “Tags” in WordPress to something else, but how?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Set post terms for multiple posts
- Display Registered Taxonomies
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Display custom posts randomly in custom taxonomy archive
- WP_Query parameter conflict
- providing access to post_id or post inside functions.php
- How to get all posts related to particular category name on button click?
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- List all Custom Post Type posts excluding certain Taxnomy term
- Display custom posts for each category from its custom taxonomy
- Get custom category ID of current custom post within the loop
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Conditional Statements
- Add filter to Admin list for all custom post types by their custom taxonomies
- Single.php for Custom Post Type > Taxonomy > Term
- Get newest created custom category (get_term_by and variables) (outside Loop)
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Displaying custom taxonomy menu in custom post type archive
- Custom post types templates
- prevent sub categories to show up
- Taxonomy terms with the same name are updated between separate custom post types
- Custom taxonomy permalink without term, redirection to CPT slug
- Custom post type category link redirecting to 404 page
- Using `set_transient()` when saving a custom post type
- Archive page URL for custom taxonomy and post type
- Display post count for a specific month
- Add html tot CPT edit screen – no metabox
- Custom Post Type Archive Page showing as 404
- Custom taxonomy terms hierarchical navigation
- Create custom post type categories
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Add other all taxonomies as meta boxes to custom post type
- How to get post type archive category title
- Remove CPT Slug with 2 taxonomies and 1 post meta
- URL with Hierarchical Taxonomies and same slug for all terms and sub-terms
- Should I make a taxonomy to organize data like this?
- Display Custom taxonomy, Child terms and posts in a template Under Specific Parent terms
- Associate custom categories to different user IDs
- List all posts from custom post type by taxonomy
- archive-{custom_post_type}.php not getting recognized wordpress
- How to retrieve the permalink for a specific (custom) term?
- Values inside a custom field to determine which category posts to display
- changing post type in loop query
- Taxonomy and Rewrite Structure
- Pagination for a Custom Taxonomy
- Trying to create hierarchy between 3-4 custom post types
- Custom Post Type Base URL
- Only One Post of Custom Post Type Appearing on Template Page
- Code to show related posts (custom post type and custom taxonomy/category) is messing with other code
- register_term_meta not working
- Custom Post Type urls not working
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Show a wordpress custom post condtionally using a category term