Fox 2000 has cast Zachary Gordon in the title role in the movie adaptation of Diary of a Wimpy Kid, based on Jeff Kinney's best-selling illustrated novels, according to The Hollywood Reporter. The books are written as a journal penned by middle-school student Greg Heffley (Gordon). Gordon previously appeared in National Treasure: Book of Secrets and The Brothers Bloom, and guest-starred on CBS' How I Met Your Mother. Chloe Moretz ((500) Days of Summer) is in negotiations for the female lead, an intense student with a wry sense of humor who dresses in all black. Rachel Harris (The Hangover) has been cast as Gordon's mother.