The court may appoint an attorney to represent the interests of a minor or dependent child with respect to provision for the parenting plan in an action for dissolution of marriage or domestic partnership, legal separation, or declaration concerning the validity of a marriage or domestic partnership. The court shall enter an order for costs, fees, and disbursements in favor of the child's attorney. The order shall be made against either or both parents, except that, if both parties are indigent, the costs, fees, and disbursements shall be borne by the county.