According to the journal Nature, a ‘green-beard’ gene is defined as a gene that causes a phenotypic effect (such as the presence of a green beard or any other conspicuous feature), allows the bearer of this feature to recognize it in other individuals, and causes the bearer to behave differently towards other individuals depending on whether or not they possess the feature.
Usually we associate green beard effects with altruistic or at least helpful behavior, for example a gene that causes you to be nice to people who look like you may spread if the people who look like you also have the gene. But in 2014 I proposed a green beard effect may spread gayness by causing gays to spread homophobia, which would shame themselves or other gays into feigning straightness by becoming fathers, thus replicating genes for closeted gay homophobia. This may explain why gay genes have spread despite gays supposedly having so few children. In fact evidence suggests millions of gay men marry women and presumably reproduce, and this is especially true in the least tolerant states, suggesting homophobia enhances gay genetic fitness.
Further support for my theory comes from the fact that a lot of anti-gay Republicans turned out to be closeted homosexuals, as do a lot of men who devote their lives to religion (which is generally anti-gay). In addition, a scientific study of homophobic men found them more likely to be secretly gay. The hatred of homosexuals in many cultures is so visceral that I suspect homophobia has an evolutionary role.
I’m not suggesting my theory is the only explanation for gayness. It may not even be the only genetic explanation, since some research has suggested that genes that make men gay also enhance the fertility of their female relatives.
There are also strong prenatal environmental effects causing boys with more older brother to be more likely to be gay.
Lastly we can’t rule out cultural effects. There’s a very old theory that holds that if a boy’s mom is more dominant than his dad, the trauma of witnessing this could cause the boy to be gay. Of course it could just be that boys with less dominant dads became gay for genetic reasons.