Occasionally I see claims that, under Cohen v. California (1971), the government may not bar people from displaying vulgarities in courthouses. (See, for instance, this comment.)
I don’t think that’s a correct reading of Cohen. That case did set aside Cohen’s disturbing-the-peace conviction, which was based on Cohen’s wearing in a courthouse (but not a courtroom) a jacket that said “Fuck the Draft.” But the Court expressly did not consider whether a target ban on vulgarities in courthouses would be constitutional. Rather, the Court stressed that the particular statute involved in that case did not contain such a targeted ban:
Cohen was tried under a statute applicable throughout the entire State. Any attempt to support this conviction on the ground that the statute seeks to preserve an appropriately decorous atmosphere in the courthouse where Cohen was arrested must fail in the absence of any language in the statute that would have put appellant on notice that certain kinds of otherwise permissible speech or conduct would nevertheless, under California law, not be tolerated in certain places. No fair reading of the phrase “offensive conduct” [in the disturbing-the-peace statute] can be said sufficiently to inform the ordinary person that distinctions between certain locations are thereby created.
Some years after Cohen, the Court made clear that the government acting as proprietor does have more power to restrict speech on “nonpublic forum” government property — such restrictions are reasonable and viewpoint-neutral. Office buildings such as courthouses would likely qualify as “nonpublic fora,” and bans on vulgarities in such buildings likely would be reasonable and viewpoint-neutral and therefore constitutional.