I read an article that says that Mary Magdalene was the author of the fourth Gospel and that John of Zebedee is generally believed by most biblical scholars not to have written the fourth Gospel. Could Mary Magdalene be the beloved disciple who wrote the fourth Gospel?
Without being able to read the article you read, I cannot comment on that article. Christian tradition has never assigned authorship of the fourth Gospel to Mary Magdalene. Given the current interest in Mary Magdalene’s place in the Church and her relationship with Christ, speculation that she is the “beloved disciple” referred to in the Gospel of John is more likely a modern phenomenon than an ancient reality.
As one point in contradiction to the speculation: The author of the fourth Gospel uses the term beloved disciple in order to avoid referring to himself by name. He apparently wanted to make clear the relationship for theological reasons (e.g., it is a symbol of every Christian’s call to be Christ’s “beloved disciple”), but did not want to name himself and thus make his relationship with Christ exclusive. However, the author has no problem naming Mary Magdalene (cf. John 19:25, 20:1, 20:18). Indeed, in one particular verse, the author makes a distinction between Mary Magdalene and the beloved disciple:
Now on the first day of the week Mary Magdalene came to the tomb early, while it was still dark, and saw that the stone had been taken away from the tomb. So she ran, and went to Simon Peter and the other disciple, the one whom Jesus loved, and said to them, “They have taken the Lord out of the tomb, and we do not know where they have laid him” (John 20:1-2; emphasis added).
If Mary Magdalene were the beloved disciple who wrote the fourth Gospel, these verses would make no sense.