
742 So.2d 188 (1999)
Karen Cochran PROFFITT
v.
Tommy Daniel COCHRAN.
2980671.
Court of Civil Appeals of Alabama.
August 6, 1999.
*189 Troy Grayson of Riverchase Legal Center, L.L.C., Birmingham, for appellant.
M. Lionel Leathers of Hollis, Leathers & Leathers, P.C., Winfield, for appellee.
THOMPSON, Judge.
On May 1, 1995, Karen Cochran Proffitt ("the mother") sued for a divorce from Tommy Cochran ("the father") in the Circuit Court of Marion County. The parties had a son and a daughter born of their marriage. The son is now 13 years old and the daughter is now 15 years old.
The parties entered into an agreement that provided that they would have "joint custody" of the children. In particular, the parties agreed that after the divorce the father would "have visitation with the children every other weekend from 5:00 p.m. Friday until 5:00 p.m. Sunday and other reasonable times and reasonable places as agreed upon by the parties." Further, the agreement provided that the father would pay $50 per week for child support. The trial court divorced the parties on May 2, 1995, and incorporated into its judgment the agreement of the parties.
Both parties remarried. The mother and her new husband moved to North Carolina, and the children moved to North Carolina to live with the mother in May 1997. The father and his new wife continued to reside in Alabama.
On August 13, 1998, the father filed a petition to modify the divorce judgment. The father sought the exclusive care, custody, and control of the children because, he argued, the children were without adult supervision during the mother's employment hours as a nurse; the daughter had "a history of truancy"; and both children's academic progress had declined. That same day, the trial court awarded the father temporary custody of the children.
The mother petitioned for a hearing. Following a hearing, the trial court entered an order awarding the father temporary custody of the daughter and awarding the mother temporary custody of the son. However, shortly thereafter the mother returned the son to the father because the son was having difficulty dealing with the separation from his sister.
The court held another hearing on December 17, 1998, and it entered an order on January 25, 1999, awarding custody of both children to the father and ordering the mother to pay $314 per month in child support. The mother appealed.
The mother argues that the trial court erred in awarding permanent custody of the children to the father because, she says, the father presented no evidence to meet the requirement of Ex parte McLendon, 455 So.2d 863 (Ala.1984)that one seeking a change in child custody demonstrate that a change in custody would materially promote the well-being of the child. The father argues that the McLendon requirement does not apply in this case because, he says, he and the mother had entered into an agreement whereby the father would have custody of the children.
All settlement agreements entered into by attorneys and occurring at the trial-court level are governed by § 34-3-21, Ala.Code 1975. Ex parte Sims, 627 So.2d 380, 382 (Ala.1993). To be effective under § 34-3-21, an agreement must be made in writing or entered in the minutes of the court. Holmes v. Sanders, 729 So.2d 314, 316 (Ala.1999); and Ex parte Kiely, 579 So.2d 1366, 1367 (Ala.Civ.App. 1991). In Daniel v. McClain, 585 So.2d 69 (Ala.Civ.App.1991), this court held that the McLendon requirement does not apply when the parties enter into a child-custody agreement.
The testimony presented during the December 17, 1998, hearing indicates that an agreement existed between the parties. The mother testified in response to a question from the father's attorney:
"Q. Of course, you understand now that we have agreed to abide by what the children wanted, and they say they want to stay here and you want it fixed, *190 the court order on visitation, exactly when you are to pick them up, exactly when you are to bring them back so there won't be any confusion at all; right?
"A. Yes, sir."
During the hearing, the mother and the father testified and introduced evidence pertaining only to issues concerning child support, a child-support arrearage, payment of medical bills, and payment of the parties' debts. Further, the father's attorney and the mother stated at the conclusion of the hearing:
"Mr. Leathers: Oh, Judge, once you do an official order, there may be some, I'm assuming this, there may be some personal property of these children that is there that they will be wanting back. "Mrs. Proffitt: I already told them that they could have all their stuff."
Although the testimony at the December 17, 1998, hearing indicates some sort of agreement, the terms of that alleged agreement are not disclosed in the record, and the trial court did not incorporate that alleged agreement, or refer to it, in its January 25, 1999, order. In order for a case to come within the Daniel exception, making the McLendon standard inapplicable, this alleged agreement would have had to been made a part of the record and have been adopted by the court. Ashbee v. Cozart, 611 So.2d 1103 (Ala.Civ.App.1992).
We reverse the judgment of the trial court and remand this case for the trial court to determine whether an agreement existed, in accordance with § 34-3-21, between the parties concerning the custody of the children, and, if so, to incorporate fully that agreement into its final judgment. If the trial court determines that the parties had no such agreement, it must make a finding as to whether a custody modification would materially promote the best interests and welfare of the children. See McLendon, supra.
The mother's request for an attorney fee is denied.
REVERSED AND REMANDED WITH INSTRUCTIONS.
YATES, MONROE, and CRAWLEY, JJ., concur.
ROBERTSON, P.J., concurs in the result.
