I've written up quite a few custom classes, just for fun — I did a sort of "gritty reboot" of the classic four, replacing them with Knight Errants, Astrologers, Friars and Graverobbers — the intention being to create characters who might have actually existed in the Middle Ages. It was a fun thought experiment, but I doubt anyone would want to play with my classes.
The excellent blog "Hill Cantons" did a write up of the custom class rules and if you do a google search you can find it pretty easily.
Be warned though that one of the writer's goals is to privilege the classic four classes—so any custom class you create is going to be weaker than the original batch. Plus the Cleric class just does not work under those rules. By the rules the Cleric would need about 5,000 xp to reach second level.
It's my belief that Gygax et. al. had trouble getting anyone to play a Cleric, so they just kept dumping advantage after advantage on the class until you'd be a fool to play anything else.