Function: "If user if logged in…"

This topic contains 2 replies, has 2 voices, and was last updated by  Evan Burrows 10 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #12857

    Evan Burrows
    Buyer
    Post count: 18

    Is there a function/hook already made that would allow me to do something like the following:

    If $user == loggedIn {
    echo $this
    } else {
    echo $that
    }

    #12859

    Simone
    Expired Member
    Post count: 3515

    Yes, you can use the WordPress function

    <?php if ( is_user_logged_in() ) { ... } ?>

    More info here http://codex.wordpress.org/Function_Reference/is_user_logged_in

    #12863

    Evan Burrows
    Buyer
    Post count: 18

    Oh that’s right. Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount