Do you have to wear a yamaka in a synagogue?

Do you have to wear a yamaka in a synagogue?

Though it is not required, when a non-Jew wears a kippah in a synagogue, it is considered a sign of respect. Yarmulkes are often provided to guests at a Bar or Bat Mitzvah. They are also often provided at bereavement events and at Jewish cemeteries.