WordPress.org

Ready to get started?Download WordPress

Forums

Widget only visible if visitor not logged in OR AutoTheme Selection if logged in (6 posts)

  1. dainismichel
    Member
    Posted 5 years ago #

    VIA WIDGET FUNCTIONALITY:
    What I'm wanting to is not show my newsletter subscription widget, if people are logged in.

    Logically, then, I am wanting to show a widget only if users are not logged in.

    VIA THEME SELECTION
    If there is a plugin that automatically shows a particular theme to logged in subscribers, then I would just use the same theme twice, and add particular features for the subscriber theme.

    I've found two theme switcher tools, but they basically look like they give people the option to switch themes. What I want is to manage what logged in and not logged in visitors see.

    Does that make sense, and how could I do it?

    Best,
    Dainis

  2. dainismichel
    Member
    Posted 5 years ago #

    Found this but don't know if it would break wp 2.7 (latest version).

    http://wordpress.org/extend/plugins/user-level-themes/faq/

  3. asechrest
    Member
    Posted 5 years ago #

    Maybe try Widget Logic plugin?

    Looks like you could check to see if a user is not logged in, then show the widget.

  4. dainismichel
    Member
    Posted 5 years ago #

    Hmm...great plugin tip thanks!

    Odd, I tried it with

    is_user_logged_in('false')
    and
    is_user_logged_in('true')

    and both of them do the opposite of what I would like. Both options display the widget only if the user is logged in, and I want it to be if the user is not logged in.

    I was thinking about validate_username('false') ...

    Maybe I'm doing something wrong with the formatting of the return value?

    Best and thanks!

    --Dainis

  5. dainismichel
    Member
    Posted 5 years ago #

    Here's how it's done: !is_user_logged_in()

    Cheers!
    Dainis

  6. sharris203
    Member
    Posted 4 years ago #

    I found this helpful. Exactly what I was looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic