How to store multiple input values with same meta_key
Change your form as suggested: function startdate() { global $post; $custom = get_post_custom($post->ID); echo “<label>Startdates</label><br/>”; for ($i=0; $i<count($custom[“startdate”]);$i++) { echo “<input type=\”text\” name=\”startdate[“.$i.”]\” value=\””.$custom[“startdate”][$i].”\” />”; } } You’ll have to remove and reinstate your individual postmeta entries: add_action(‘save_post’, ‘save_details’); function save_details($post_id) { if ($parent_id = wp_is_post_revision($post_id)) $post_id = $parent_id; if (!empty($_POST[‘startdate’]) && is_array($_POST[‘startdate’])) { delete_post_meta($post_id, … Read more