A Santa Monica man must undergo counseling for repeated racist and sexist remarks if he wants to be with his kids.

A split appellate court upheld that order late Tuesday, saying the man’s angry outbursts about women and minorities made it difficult, if not impossible, to implement a reunification plan with his twin daughters.