Info
- 11 posts
- 5 voices
- Started 2 years ago by massbase
- Latest reply from Shagalaga
- This topic is resolved
IF User is logged in DO, if not DO...
-
- Posted 2 years ago #
is there an if structure to do little if's around the site, for example im having trouble changing the header of my site, to display certain texts when they're logged in and when they're logged out.
-
- Posted 2 years ago #
Try
<?php if (is_user_logged_in()) { ?> HTML <?php } ?> -
- Posted 2 years ago #
and if user is not logged in
<?php if (!is_user_logged_in()) {
?>
HTML
<?php } ?> -
- Posted 2 years ago #
Hi all,
is this a function from bbPress 1.0 Release Candidate? In 0.9.0.5 it seems not to work:
"Fatal error: Call to undefined function is_user_logged_in() in ../forum/bb-templates/scoun/front-page.php on line 3" -
- Posted 2 years ago #
Hi,all
I use this for display "add new topic", try:<?php if ( bb_is_user_logged_in() ) : ?>
HTML
<?php endif; // bb_is_user_logged_in() ?> -
- Posted 2 years ago #
I am getting
'Fatal error: Call to undefined function is_user_logged_in() in C:\wamp\www\massbase\my-templates\massbase\header.php on line 45'
same thing as Markus Pezold...
I am using the 1.0 relsease..
please help thanks.
-
- Posted 2 years ago #
Hi massbase,
the code from Ohna "(bb_is_user_logged_in())" works perfect in my installation. No more problems with that.
-
- Posted 2 years ago #
wooohooo, thanks Ohna, and thanks Markus for pointing out Ohnas post was different to James's
I plan to release my theme to the general public and boy, its looking awesome.
-
- Posted 2 years ago #
Whoops... Need to remember to switch out of WordPress support mode! Totally my fault.
-
- Posted 2 years ago #
@jjj good thing you left in the 0.9 code in, the forum needs more detailed function support. cheers.
-
- Posted 2 years ago #
<?php if ( !bb_is_user_logged_in() ) : ?>
HTML
<?php endif; // bb_is_user_logged_in() ?>this very good to add extra information or Ads for people who are not logged in ;-)
Yes it works!
-
You must log in to post.