Copying taxonomy term to custom field

Try hooking into ‘save_post’ action: add_action( ‘save_post’, ‘your_state_term_save’ ); function your_state_term_save( $post_id ){ // Bail if we’re doing an auto save if( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return; //check if they selected your state term $state = isset($_POST[‘tax_input_field_name’]) ? $_POST[‘tax_input_field_name’] : ”; //make sure of what the input name is here… //insert post meta … Read more