Custom fields and auto save
You need to check to see whether the $_POST data contains your custom field information before saving it: if (!empty($_POST[“intro”])) { update_post_meta($post->ID, “intro”, $_POST[“intro”]); } Also, WordPress will pass the post ID and post object into your callback if you ask it too. function save_intro($ID, $post){ //preserve the data in the admin section // … … Read more