Humor and irony are not the same thing. Humor is something that is amusing. Irony is the occurrence of the opposite of what is expected, like a truck driver being afraid of traffic.
One example of both humor and irony is in the discussion Consuelo has in which she describes for Richard how badly Juan, her husband and Richard's father, gambles and how free he was with their possessions.
There is humor because it is a trifle amusing to picture Juan stepping out of their house wearing nice clothing complete with "a new shirt and jacket" and returning later with only "his trousers and his hat."
There is also irony (the opposite of expectation) in this humor because, while he is being magnanimous (generous) with the poor people round about, he leaves his wife and son to go without and to beg from her great-grandfather to feed them.
Consuelo: "[If] it were not for my great-grandfather, the children and I would not eat."