How can I create an announcement for guests only?

Hi,

I have created a welcome announcement for those that enter my site and tells them a bit about it, along with encouragement to sign up.

However, if somebody signs up they will have to click the X on the message. Doesn’t make sense for me to show that message to people that have registered!

Is there a way to only show this announcement to guests? I tried to create a category that is only visible to guests but I am not seeing that as an option.

1 Like

The easiest way would be to add some custom CSS (admin > customize > themes) to hide the message for logged-in users. We add anon to the html tag for logged-out users so if you have a banner you can do…

html:not(.anon) {
  #banner {
    display: none;
  }
}
6 Likes

Thank you so much! :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.