I think it is very important for us to understand in full context what the Church teaches, and what the disciplinary practices of the Church are.
Anyone who attempts to enter into religious life in the Catholic Church, be it the priesthood, or as a lay brother, nun or lay sister is bound not only to Chastity, but to a celibate life.
Everyone who professes the Catholic Faith, and wishes to live according to the moral teachings of the Faith must live or strive to live a life of chastity.
Chastity according to one’s lifestyle means that if one is not married, they will refrain from sexual activity period. If one is married, they will only engage in morally licit sexual activity with their spouse, and not seek sexual satisfaction outside of their marriage bed.
While the discipline regarding unmarried deacons, priests, Religious brothers, sisters and nuns is that they may not engage in sexual activity, homosexual or heterosexual period, (as they have vowed to God that they will not. It is possible for someone who has previously engaged in sexual activity, within or outside of marriage to enter Religious life, or the diaconate or priesthood in the Latin Rite. The Church has specific requirements regarding these people.
If a man or woman was married and their spouse has died, they have no minor children whom they are responsible to raise, they may after a period of time specified by their bishop or the superior of their order enter into formation for religious life. If someone who was not married, and does not have obligations to minor children, but has been sexually active after a conversion of his or her life to practicing a moral lifestyle, wishes to enter into Religious life, they may with the approval of their bishop or the Religious superior.
Since homosexuality carries both social and moral stigmas to it, the Church has specifically stated that they are to have remained chaste usually for a period of five years.
Now we have to remember that being chaste is not just not acting out sexually, but how we behave and believe by our other actions. So if someone has simply not had sexual activity, but has promoted something sinful as being moral, they would be excluded from religious life. As an example, if someone heterosexual or homosexual was to not have sexual activity, but support immoral lifestyles, such as encouraging or offering support to groups which endorse unmarried co-habitation, or sexual behavior outside of marriage, they would not be seen as morally or spiritually fit for Religious life. To not engage in sin, but encourage it in others is just as damaging to one’s soul as to engage in the sin ones self.
Most Eastern Rite Catholic Churches allow a married man to be ordained as deacon or priest, however bishops must either be widowed or celibates. In the Latin Rite the practice is for permanent deacons to be either married or celibate when they are ordained, if they are married, and their wife dies, they revert to the celibate lifestyle. Some former protestant ministers who convert and were married while they engaged in their previous ministries, some have been allowed to retain their wife and be ordained as Catholic Priests. This is allowed after a period of time which the local bishop feels sufficient for them to understand the moral and spiritual requirements, as well as hardships they may face as priests, which they did not face as a Protestant minister. But even in these cases, they are expected to remain faithful to their spouse, and if their spouse dies to not marry another wife if their spouse dies after ordination occurs.
Sadly I do have to add that there have been Religious who have not lived up to the moral standards they have freely chosen to accept and vowed to follow. Over the past 40 years or so there have been many who have openly defied the moral and dogmatic teachings of the Church, and claim that their new and modern understanding of morals or dogma which defy authentically Catholic teachings are correct. While some have maintained their posts, since they do not teach in communion with authentic Catholic teachings, we must defy or ignore those things they propose when we know them to be contrary to what the Church teaches, regardless of any title or position they hold. It is Christ Jesus we will answer to, not a bishop, priest or nun who teaches in opposition to what the Church teaches.