Templars & sodomy
During the suppression of the order of the Knights Templar in the early 1300s, the most often repeated charge against the order was that of "sodomy". Sodomy - the then (during the 1300s) common term used to express homosexuality.(*) The trail document didn't spare any blushing details, describing the acts of kissing the body on the various places in cluding private parts of initiates: mouth, navel, penis, and the bum.
(*) the term homosexuality was not coined untill the late 1900s.
Pre Christian Europe
The act of anal and oral sex had not been a taboo in Europe before the adoption of Christianity by the pagan Roman Empire. Greeks seemed to be particular fans and tolerant of bisexuality in the upper classes, they did not care if a man had an extra toyboy as long as offspring was produced (**).
The issue for pagan Romans was, a bit different. With the Romans, rank was the issue, not the sex: whether a man of senatorial rank allowed himself to be the submissive partner it the sexual act. Because if he played the bottom to somebody of inferiour social rank - that was a no-no.
(**) Nor did greeks care what happened in the lower classes as long as it was not spoken about.
Christian Europe
Now, in Christianity - inheriting the judaic opposition to homosexuality - gave us an outright ban on same gender sex. This did not stop ofcourse, the happening of it. especially in monaserie where men were grouped together in celibate conditions. It is reasonable to assume that many gay men in the Middle ages might have headed straight for their local monastery - thus avoiding the persure to get married and being in the company of men around the clock.
Sodomy was a serious accusation, and any doing it would be damned to go hell. It is still used today in arab countries(***) to discredit political opponents, and every one else that stands in their way.
To get a bit of an idea of how the legal system viewed anal sex, you can access the British Central Criminal Court archives, free of charge and check the record going back three hundred years. Many of the accusations of sodomy in the middle ages, led to guilty verdicts. Punishment were severe (tortured to death / Burned at the stake.)
England
It is believed, that england was more likely to allow leeway for acts of penance and rehabilitation - though ironiclly the king who oversaw the seizure of Templar property, Edward II, would come to be accused himself of sodomy by his political enemies. One of his accusers was a bishop who had been prominent in the Templar trails - in other words, accusing people of sodomy seems to have been a regular tactic of his. Repeatedly, we see heretics throughout the medieval period accused of sodomy.
(***) in countries such as: iran, iraq, pakistan and saudi arabia. No proof of being gay is ever given, the person is just sentenced without a fair trial.
Templars and sodomy
Templars suffered the same fate, that of being political scapegoats. In order for king philip, to get his hands on Templar riches, and to cancel his enormous debt he had with them, surprice surprice, he used the same tactic of calling Templar Knights, heretic sodomites.
The question therefor is - Were all Templars indeed sodomites? Well, if they were, like many other monks, knights and monasteries of the time - and indeed a great detail of all men throughout human history (#) - we can savely assume that SOME Templars might have been gay and indulged their passion in secret, behind the veil of the order and unknown to the masters. However they would have been aware of the biblical prohibition on the act and be careful not to be exposed. The Order itself had severe rules against it.(##)
Besides, surely not ALL of them would have been gay. At most they would have been tolerated within the order, as the united states army does with its "don't ask, don't tell" policy for their marines. However the absurd notion, that sodomy was part of their initiation and thereby practiced by the entire order is far fetched, and looks more like a smear campaign, a spin off idea by the catholic church and french monarchy to make the order look bad.
(#) Alexander the Great, King David of Israel, Leonardo da Vinci, Charles Dickens, Oscar Wilde etc
(##) A Templar could be expelled from the order (Called loss of house) and sent off to serve as a Cistercian monk for committing sodomy... (The Templar Code of dummies, part 2, chapter 4, page 94 Punishment and penance, paragraph 4.)