That would be achieved using the wp_set_post_terms
function.
https://codex.wordpress.org/Function_Reference/wp_set_post_terms
You could run an ajax request on the change
event of the dropdown to either wp-admin/admin-ajax.php or a custom JSON API endpoint (preferred but more work) with a payload like this
{
new_status: 123
post_id: 321
}
Ensure 100% that the user that is logged in has authorization to modify the post
$post = get_post( filter_var( $_POST['post_id'], FILTER_SANITIZE_NUMBER_INT ) );
if( /*Test User Auth*/ ){
wp_set_post_terms( $post->ID, [
filter_var( $_POST['new_status'], FILTER_SANITIZE_NUMBER_INT )
], 'status' );
}
Related Posts:
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- How to get all taxonomies of a post type?
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- How do I append multiple taxonomies to the URL?
- Custom Taxonomy as Dropdown in admin
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to completely disable a taxonomy archive on the frontend?
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Custom taxonomy not showing up when adding a new custom post type
- How do I list custom taxonomy terms without the links?
- How to list custom taxonomy categories?
- Custom Taxonomy Template Post List with Sort Order
- wp_insert_term doesn’t work with custom post type’s taxonomy
- How to list all categories and tags in a page?
- Retrieve single term slug
- Taxonomy archives based on Custom Post Type
- Create an archive page for custom taxonomies
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- How to show term-specific post list, without posts associated with child terms?
- How to get the parent’s taxonomy?
- Query multiple taxonomy in Custom Post Type
- Include custom post type in “all posts”
- How do I list terms of a custom taxonomy at i.e. domain.com/brands/
- front end radio custom taxonomy with custom post type
- wp_insert_post custom taxonomy
- Assign category to front end post
- Custom Post Type: How to display all of same taxonomy?
- Taxonomy-{taxnonomy}.php is not working
- Display taxonomy term only if there’s a value
- Remove “-2” from a Toolset Types URL with the same post name
- Get list of terms of current taxonomy archive for another taxonomy
- Get all taxonomies for all post types
- Custom post type taxonomy template
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Associate Taxonomies Across Post Types
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Taxonomy Templates
- Custom Post Type and Taxonomy combination
- Show Post Count of a Category
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Relationship between two taxonomies and a custom post type [closed]
- Menu Multiple Taxonomies
- How to make a custom taxonomy selectable in post publish area?
- Problem with custom post types, taxonomy and permalinks
- How to create new category for custom post type?
- Fetch taxonomies by custom post type id array
- How to check the terms in single custom post type template
- get_terms showing all categories instead of the ones assigned to a specific post
- How can I move a custom taxonomy and its data from one post type to another?
- Custom page template for category taxonomy
- Query Multiple Taxominies Across Multiple Post type’s
- How do I get array of types associated with a taxonomy?
- Display all posts in main category and 1 subcategory
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- How to save custom taxonomy from front end post submission
- Custom Taxonomies not appearing in Admin
- Custom Post Type Taxonomy Filters
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- How to Filter custom post type by taxonomy?
- Is it possible to have dedicated page for parent/child taxonomy?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Get related posts of child term of custom post type
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Display a grid of taxonomy terms at root taxonomy page
- limit value taxonomy based on previous taxonomy value wordpress
- How do I display the taxonomy for a custom post type in an array
- How to conditionally redirect to the post from a taxonomy page?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- How do I display the grand child items of a taxonomy term?
- Taxonomies relations
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- Suggested Post and Taxonomy structure
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- How to make front end form only accept certain values
- How to get list of taxonomy slugs ordered parents>childs?
- How do I share categories across multiple post types?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link