@Marymog
One DOES have to be unmarried to be a priest.
Do you know why some priests are married?
Because they were of a different denomination, for instance most were Anglicans who came back to the Catholic Church.
Some with families were NOT accepted back, and some with families were.
It depends on the Pope. With the participation and recommendation of the Bishop.
I'll go one step further.
If a Deacon is unmarried when becoming a Deacon,(ordination) he cannot get married.
If he is married and his wife dies, he cannot get remarried.