Forums

Widget Logic - Do not display for people logged in (3 posts)

  1. StuMC10
    Member
    Posted 2 years ago #

    Is there a conditional tag so that I can show/not show a certain widget based on whether the person is logged into the blog.

    So let's say a subscriber logs into my blog, I'd like to remove certain widgets and display others.

    The only thing I'm stuck on is what the tag would be for roles.

    Any thoughts?

    Thanks.

    Stu

  2. StuMC10
    Member
    Posted 2 years ago #

    I found the solution here:

    http://codex.wordpress.org/Function_Reference/is_user_logged_in

    Hopefully that helps anyone else looking for the same thing.

    Take care.

    Stu

  3. DustyGhost
    Member
    Posted 2 years ago #

    Actually I could do with knowing how to apply this to the "Recently Posted" widget.

    I only want to show it to users logged in. But can't find the code for the widget to use the is_user_logged_in() function.

    Anyone know where the code for this particular widget is?

Topic Closed

This topic has been closed to new replies.

About this Topic