Your spouse may attend a child custody hearing because the hearings take place in a courtroom that is open to the public. If this is likely cause problems with the mother of your child, I would advise you not to do it. You and the mother are litigating an issue that exists between the two of you. It does not help settlement discussions to have your new spouse present for the purpose of irritating the mother. Regarding mediation, the mediator is very unlikely to allow your new wife to participate.
This answer is for informational purposes only. By answering this question, no attorney/client relationship is created. Although the legal information is accurate, it may not be appropriate for your situation. The best way to handle any legal problem is to seek the advice of an attorney.