Post content is cleared when updating
You can modify your code: add_action( ‘save_post_subpage’, ‘eb_save_subpage_data’ ); function eb_save_subpage_data( $post_id ) { You have to use this action to add custom fields, default post data are saved automatically.