Hide wordpress widget using conditional tag

admin

Administrator
Staff member
I want to hide a text-widget in wordpress using conditional tags when users are logged in. I've learned that using

Code:
is_user_logged_in()

shows a text widget when users are logged in.