Delete a custom post function value

Your function is checking to see if anything “is set” before proceeding to update, and also that it isn’t an empty string. Remove the “if” portions of your update statements, or better yet, put an “else” after to delete post meta if it is empty.

Example:

if ( isset( $_POST['games_database_game_release'] ) && $_POST['games_database_game_release'] != '' ) {
    update_post_meta( $games_database_id, 'game_release', $_POST['games_database_game_release'] );
} else {
    delete_post_meta( $games_database_id, 'game_release');
}

tech