Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: sharing wordpress sidebars – profile link only in bbpress? how?

@nolageek

Participant

I knew it was something simple.. some sleep helped me figure out I was missing a ‘global $forum’

I got it working with the following:

In my theme’s functions:

<?php

function show_bblogin() {
global $forum;
if ( $forum ) {
login_form();
if ( is_bb_profile() ) profile_menu();
} else {
echo '<a href="/forum/">Visit the Forum!</a></br>';
}

}
?>

and in my sidebar:

<?php show_bblogin(); ?>

Works like a champ.

Skip to toolbar