Remove a custom options name/value pair

based on MMK’s help below, here’s the code: $toremove = 605 // I actually use a var like so $toremove = $_REQUEST[‘somevar’]; I’m just using 605 as an example $selectid = get_option(‘swcs_postpage_id’); $key = array_search ($toremove, $selectid); unset($selectid[$key]); update_option(swcs_postpage_id, $selectid);

WP_Error with multiple form validation message

Updating this for people who might have the same issue. //save the new post and return its ID $post_id = wp_insert_post($new_post); // This will redirect you to the newly created post (Using GUID) $post = get_post($post_id); wp_redirect($post->guid); exit(); Change above code to below code will solve the issue. $errors = write_here_errors()->get_error_messages(); // only create post … Read more