Skip to:
Content
Pages
Categories
Search
Top
Bottom

Determine if user is logged in on template


  • vanesta
    Member

    @vanesta

    What is the equivalent of <?php if ( $user_ID ) : ?> on wordpress template tag for bbpress?

    I want to display text when user is logged in and something else if user is not logged in

Viewing 2 replies - 1 through 2 (of 2 total)

  • r-a-y
    Participant

    @r-a-y

    Hey vanesta,

    Try this:

    <?php if ( bb_is_user_logged_in() ) : ?>
    <div class="message">LOGGED IN MESSAGE</div>
    <?php else: ?>
    <div class="message">NOT LOGGED IN MESSAGE</div>
    <?php endif; ?>


    vanesta
    Member

    @vanesta

    Thanks Ray!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.