Why do I lose the content of meta boxes when I leave the page?
This is because save_details is not checking if its an autosave routine: add_action(‘save_post’, ‘save_details’); function save_details() { global $post; // verify this is not an auto save routine. if ( defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE ) return; update_post_meta($post->ID, ‘short_description’, $_POST[‘short_description’]); }