WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hide Widgets when not logged in (3 posts)

  1. DustyGhost
    Member
    Posted 4 years ago #

    Hello there,

    On my sidebar I have the Recent Posts widget.

    But I only want this to show if the user is logged in.

    Anyone know how to do this?

  2. DustyGhost
    Member
    Posted 4 years ago #

    Just found the Widget Logic plug-in!

    Works like a charm when you add is_user_logged_in() to the php code on the widget!

  3. grosbouff
    Member
    Posted 4 years ago #

    Another way to hardcode that in the functions.php ?

    I would like to avoid to install another plugin; I just want to hide a specific widget if the user is logged. I don't need more control than that.

    How could I do it ? Is there a filter or action ?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.