Prince William poses for gay mag

Prince William (AAP)
Prince William (AAP)

Just four days after 49 people were murdered at a gay night club in Orlando, Florida, the future king of the UK -- and New Zealand -- will feature on the cover of a gay magazine.

Attitude, the UK's best-selling magazine for the LGBT community, wanted to keep Prince William's photoshoot a secret -- but he let the news slip while signing a book of condolences for those killed in Orlando.

Prince William poses for gay mag

Prince William on the cover of Attitude (Attitude)

"No one should be bullied for their sexuality or any other reason and no one should have to put up with the kind of hate that these young people have endured in their lives," the prince told Attitude.

"The young gay, lesbian and transgender individuals I met through Attitude are truly brave to speak out and to give hope to people who are going through terrible bullying right now. Their sense of strength and optimism should give us all encouragement to stand up to bullying wherever we see it."

William's mother Diana was an outspoken advocate for gay people, and last year he attended a number of events raising awareness of homophobia.

"What I would say to any young person reading this who's being bullied for their sexuality: Don't put up with it -- speak to a trusted adult, a friend, a teacher, Childline, Diana Award or some other service and get the help you need," he told Attitude.

"You should be proud of the person you are and you have nothing to be ashamed of."

William is the first royal to star on the magazine's cover, but not the first straight man -- following in the footsteps of footballer David Beckham, former Prime Minister Tony Blair and late actor Heath Ledger, who played a gay cowboy in film Brokeback Mountain.

Straight women to appear on the cover of Attitude include singer Kylie Minogue and Madonna.