I have come to a place in my practice where I work with a lot of custody cases. I work with the children through the instability and uncertainty typically associated with custody disputes. What I have witnessed is that some parents forget that children still love and want a relationship with the other parent. Too many children feel pulled in the middle of these disputes, like they have to choose a side. This is not what family is supposed to be. At no time in Scripture are children told to only honor one parent, but not the other.
When one parent talks about the other parent in front of the child, seeds of hate and resentment are planted that could potentially grow into the child's personality and actions. There are some parents that mean no ill-will toward the ex-spouse, and want their child to have a better relationship with the other parent, but negative comments still get in the way.
The magic word here is "boundaries". Boundaries are the walls we put up in our mind to keep our mess from spilling over to other people. Boundaries are what allow people continue working their job despite having stress at home. Boundaries are what allow us to get along with people, even if we don't fully agree with their views or beliefs. And boundaries are what teach children how they can love imperfect people.
Parents need to understand that having boundaries does not mean to lie, avoid, or minimize problems. Lying, avoiding, and minimizing are never appropriate. Boundaries are for not allowing your mess about someone to spill over onto others that are not/were not directly involved. To put it in terms of a marriage, you and your spouse not getting along does not automatically mean that the child was mistreated or that the other person is unfit.
I get told all kinds of things about what a person did or how they used to act, rationalizations on how or why a parent understands and "can't blame" the kid for acting a certain way. Parents try to convince me how bad the other parent is and how the other parent does not deserve a positive relationship with their child. This is not a question of what a person "deserves". This is a question of what parents want to teach their children.