Forums

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

  1. StuMC10
    Member
    Posted 5 months 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 5 months 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 1 month 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?

Reply

You must log in to post.

About this Topic