Info
- 4 posts
- 4 voices
- Started 2 years ago by snails07
- Latest reply from Adam Harley
- This topic is not resolved
Some PHP help please
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
I explained this on my blog some time back - http://blog.ashfame.com/2009/09/show-content-logged-in-status-users-bbpress/
-
- Posted 2 years ago #
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; ?> -
You must log in to post.