Dear Faith,
I would make one small but significant clarification in this article- Eastern Catholic and Orthodox priests can be married but not marry after ordination.
Latin-Rite Catholicism has had priests taken from married men since the time of Christ (e.g. St. Peter), but upon ordination (to either the diaconate or presbyterate) they took on the vow of perpetual continence.
Pope Gregory VII (born HIldebrand, pope from 1073 to 1085) made it a canon law that stated that those who are called to the priesthood also need to have been given the charism of celibacy.
In both cases of married clergy and celibate clergy, (perpetual) continence was the tradition. The Easter-rite Catholicism has a different tradition which is somewhat complex.
Fr. Christian Cochini's book "Apostolic Origins of Priestly Celibacy" is enlightening.
Sincerely,
Fr. Lukas