bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Hiding objects from registered and unregistered users.

(4 posts)
  • Started 11 months ago by Thrift
  • Latest reply from Thrift
  • This topic is not resolved
  1. Thrift
    Member

    I'd like to hide the login/pass fields after a user has logged in and there are some other things I would like to hide or be available only to registered users.

    Can anyone help?

    Posted 11 months ago #
  2. Thrift
    Member

    Ok, I so figured out the <?php if ( bb_is_user_logged_in() ) : ?> tags to display items to users that are logged in. Now how can it be used to hide things from people that are logged in?

    There is a lack of documentation on functions it seems. That or I'm just not looking in the right places.

    Posted 11 months ago #
  3. Ziyphr
    Member

    Not tried this but usually with functions you can put in an exclamation mark in to what you had for not logged in.

    <?php if ( !bb_is_user_logged_in() ) { ?>
    show to those not logged in
    <?php } ?>

    Sorry if that's obvious and you've already tried it.

    Posted 11 months ago #
  4. Thrift
    Member

    Thank you!
    I'm still a little new at this so I appreciate the help with what was more then likely a very simple question. It worked after I modified it a little.

    <?php if ( !bb_is_user_logged_in() ) : ?>
    show to those not logged in
    <?php endif; ?>

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.