This in large part depends on the practice of the Court.  There is something called “Third-Party Custody” where one of the parties including child’s counsel can make the request for a Third-Party Custody hearing.  Some Judges allow this as part of a 72-hour hearing, other Judges ask for after the parents 72-hour hearing is completed. There are requirements including, for probation to do a home study and there are other alternatives as well; including kinship being foster care providers; filing guardianship actions’ some Judges allow a Motion to Intervene, but the most frequent one is a Third-Party Custody Hearing. Each court Judges have a slightly different interpretations of how the procedure would go.