Peter Mancuso appeals pro se from a trial court’s order granting GMAC Mortgage, LLC’s “GMAC” motion to dismiss. Mancuso asserts the trial court erred by granting GMAC’s motion eight days after it was filed without giving him 30 days to respond or shortening the time to respond with an order pursuant to Uniform Superior Court Rule 6.2. In its brief, GMAC takes the position that it “does not oppose remand to the trial court for further briefing on its motion.” For the reasons stated below, we vacate and remand. The record shows that GMAC submitted evidence outside the pleadings in support of its motion to dismiss, and based on this evidence, moved in the alternative for summary judgment. If, on a motion to dismiss for failure to state a claim, matters outside the pleadings are presented to and not excluded by the trial court, the motion is treated as one for summary judgment. In such a case, the court must give the parties “reasonable opportunity to present all material made pertinent” to a summary judgment motion. Specifically, the court must give the nonmoving party at least 30 days notice to prepare evidence in opposition to summary judgment. Citations and footnotes omitted. Bynum v. Horizon Staffing , 266 Ga. App. 337, 338 1 596 SE2d 648 2004. Because the trial court’s order stated that it considered the evidence submitted, it erred by failing to give Mancuso 30 days to respond with evidence showing that GMAC was not entitled to summary judgment in its favor. We therefore vacate the order granting GMAC’s motion to dismiss and remand this case to the trial court with direction to allow Mancuso 30 days to respond GMAC’s motion.