Link up and left for Termina...while he was trapped in the Sacred Realm? What?
The point is there are two endings in OOT.
In the first, adult Link seals up Ganon, and is then sent back in time by Zelda. So we have a sealed Ganon, adult Zelda, and no Link. We also have the seven sages, who were awakened by Link to take the place of the previous sages, who were killed by Ganondorf in his takeover. Everyone's happy, and peace and harmony reign throughout the land for all eternity. That is, until Ganon decides to break out of the Sacred Realm. Only this time, there's no Hero of Time to stop him because Link no longer exists in this timeline. Hyrule is flooded, a hundred or so years pass, and then WW happens. This is the adult timeline.
The second timeline is the child timeline. After being sent back in time, child Link and Zelda have a little talk, which results in Ganondorf's crimes being exposed (or future crimes, whatever). This leads to TP, during which we see Ganondorf's attempted execution. He manages to survive (albiet with a gaping wound in his chest), but is sealed up in the Twlight Realm. A hundred or so years pass, and then TP happens.
Ganon returns about a hundred years later in both timelines, but only in the child timeline (TP) can the Hero of Time's descendant appear to save the day. It's pretty clear that TP Link is descended from OOT Link, because he already has the Triforce of Courage. Meanwhile WW Link has to rediscover it for himself.
tl;dr: This interview (about a quarter of the way down, ctrl+F 'parallel') confirms that WW and TP are parallel on a split timeline.