Forums

Join
bbPress Support ForumsTroubleshootingSome PHP help please

Info

Some PHP help please

  1. When somebody visits my bbpress forum http://storeeboard.com , they are presented with the login form at the top of the page. Once they login, the form disappears and what appears is the 'Welcome, *username* | Logout' information.
    My question is, how do I get other text on the page to 'disappear' once somebody has logged in.
    I have a 'Sign Up' link on the page that I would like to disappear once a user logs in.

    My php skills aren't all that great but I know my way around xhtml and css.

  2. me either..

    try this..

    <?php if ( bb_is_user_logged_in() )  echo "";
    else
      echo "PUT_YOUR_LINK_IN_HERE"; ?>

    see if that works, hopefully someone who can write php will chime in.

  3. I explained this on my blog some time back - http://blog.ashfame.com/2009/09/show-content-logged-in-status-users-bbpress/

  4. The cleanest way of doing this hasn't been mentioned. Instead of using echo commands, it's a lot easier to just wrap HTML.

    <?php if ( bb_is_user_logged_in() ) : ?>
    this
    <?php elseif : ?>
    not this
    <?php endif; ?>
  5. You must log in to post.