how to save multiple checkboxes value in wordpress dynamically
Here you can just save the info in array and save that array in your post meta. some thing like this will work; $key = ‘save-author-to-book’; $values_to_save = array(); $new_values = $_POST[“save-author-to-book”]; $existing_values = get_post_meta( $post_id, $key, true ) ; if(!empty($existing_values)){ foreach($existing_values as $existing_value){ $values_to_save[] = $existing_value; } } if(!empty($new_values)){ foreach($new_values as $new_value ){ $values_to_save[] … Read more