Try
<?php if (is_user_logged_in()) {
?>
HTML
<?php } ?>
and if user is not logged in
<?php if (!is_user_logged_in()) {
?>
HTML
<?php } ?>
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"
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() ?>
I am getting
‘Fatal error: Call to undefined function is_user_logged_in() in C:wampwwwmassbasemy-templatesmassbaseheader.php on line 45’
same thing as Markus Pezold…
I am using the 1.0 relsease..
please help thanks.
Hi massbase,
the code from Ohna “(bb_is_user_logged_in())” works perfect in my installation. No more problems with that.
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.
Whoops… Need to remember to switch out of WordPress support mode! Totally my fault.
@jjj good thing you left in the 0.9 code in, the forum needs more detailed function support. cheers.
<?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!