From Daniel Klos…
Random question if you're ever looking for a quick blog post: When sitcoms are filmed before a live studio audience, do they play the theme song for the audience prior to filming in order to get them in the proper mood?
Quick answer: Occasionally. I haven't been to any sitcom tapings (or filmings) for a few decades but when I did go, they sometimes played the theme. They sometimes had a little video reel they'd show the audience featuring great moments from earlier episodes and it might include the theme song. They sometimes had live musicians playing music as part of the warm-up and they'd often play between scenes and somewhere in there, they'd perform the theme song — without the lyrics if the theme song had lyrics.
Before a taping of All in the Family, they'd roll out a little piano and Carroll O'Connor and Jean Stapleton would perform the theme song, "Those Were the Days," live just for the live audience. I haven't heard of a show doing anything like that in years but it wouldn't surprise me if one did.