(a)
The child may, if under the age of 12 years, and shall, if 12 years of age or older, be made a party to the action. If the child is a minor and a party to the action, the child shall be represented by a guardian ad litem appointed by the court. The guardian ad litem need not be represented by counsel if the guardian ad litem is a relative of the child.
(b)
The natural parent, each person presumed to be a parent under Section 7611, and each man alleged to be the natural father, may be made parties and shall be given notice of the action in the manner prescribed in Section 7666 and an opportunity to be heard. Appointment of a guardian ad litem
shall not be required for a minor who is a parent of the child who is the subject of the petition to establish parental relationship, unless the minor parent is unable to understand the nature of the proceedings or to assist counsel in preparing the case.
(c)
The court may align the parties.
(d)
In any initial or subsequent proceeding under this chapter where custody of, or visitation with, a minor child is in issue, the court may, if it determines it would be in the best interest of the minor child, appoint private counsel to represent the interests of the minor child pursuant to Chapter 10 (commencing with Section 3150) of Part 2 of Division 8.