How to display a banner for visitors only?

You can make use of the anon class added to the <body> tag. More on this here:

The selector in your case would be inverted like so:

body:not(.anon) {
	#banner {
		display: none;
	}
}

Which effectively hides the banner unless the user is logged out.

9 Likes