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
- How do I append multiple taxonomies to the URL?
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- 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
- Taxonomy archives based on Custom Post Type
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- How to get the parent’s taxonomy?
- Include custom post type in “all posts”
- wp_insert_post custom taxonomy
- Display taxonomy term only if there’s a value
- Get all taxonomies for all post types
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- 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
- get_terms showing all categories instead of the ones assigned to a specific post
- Query Multiple Taxominies Across Multiple Post type’s
- Custom Post Type Taxonomy Filters
- Categories of custom taxonomy don’t show any posts
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- Is it possible to have dedicated page for parent/child taxonomy?
- Get related posts of child term of 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?
- Suggested Post and Taxonomy structure
- How to make custom taxonomy into drop down select in a custom metabox
- 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
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- How to Set Taxonomy Object Description?
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- How can I create an automatic drop down menu with my tags?
- How to define a term for custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Alphabetically sort a taxonomy.php template by post title
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Show Taxonomies with admin area for custom post type?
- Custom taxonomy template list not working (404)
- Use the custom post type archive for taxonomies?
- Query custom post types & Taxonomies and list them in a table on a page
- Taxonomy template page not working
- Creating custom post type posts and associating them with a post from another custom post type
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Get posts by category name
- Add term for custom taxonomy from front end
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Query Custom Post Type by 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
- Define multiple prefixes for custom post type
- How to order taxonomy terms by most recent post?
- Taxonomies are not showing in the category dropdown
- Display 3 level taxonomies
- Get all posts for custom taxonomy term
- List posts that have the current url taxonomy
- How to transfer categories (default) to custom taxonomy?
- Custom Taxonomy – fields
- Pages of my taxonomy terms are showing all posts
- tax_query not working?
- If custom taxonomy exist on post?
- How to get all posts assigned to a taxonomy term only?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- How to show post which has the specific taxonomy terms?
- WordPress add taxonomies/terms list as a menu in archive page
- Add a meta to custom post type which corresponds to a particular taxonomy
- How to create TEMPLATES for TAXONOMIES? What I have to change in this code?
- Displaying taxonomy icon outside archive page
- Custom post type post taxonomies
- Show taxonomies from specific CPT
- insert a taxonomy for a custom post type
- See the process of creating a taxonomy and tell me where I made a mistake
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- Taxonomy listing issue – does not display how I would like
- Is it possible for post and custom post type to share a category base slug?
- Taxonomy Archive URL + Template