Forums

Join
bbPress Support ForumsTroubleshootingDifferent views for registered and nonregistered users

Info

Different views for registered and nonregistered users

  1. I know there's a way to hide a certain part of the front page by using this:

    <?php if ( bb_is_user_logged_in() ) : ?>
    INSERT HIDDEN CODE HERE
    <?php endif; else : // $forums ?>

    but I was wondering if you could have a section that only nonregistered users can view. This will make more sense after visiting my site:
    http://tapestry.endless-sonata.net
    At the bottom, I have a table that contains Hot Tags, Views, Users Online, and Top Posters. What I want is for that view to be only visible to registered users. Then, when a nonregistered user views this site, I want just the Hot tags to show in an expanded version, not off to the left. Is there a way to do this? I tried entering the alternate code after this:
    <?php endif; else : // $forums ?>
    but it didn't display anything.

  2. Nevermind. I figured it out. All I needed to do was create this:
    <?php if ( !bb_is_user_logged_in() ) : ?>
    ENTER CODE TO HIDE FROM REGISTERED USERS
    <?php endif; ?>
    A simple not was all it took.

  3. You must log in to post.