Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BP admin bar on bbpress front page


r-a-y
Keymaster

@r-a-y

@el_terko:

Sorry for not being clear!

What I mean by “deep integration” is calling WordPress into bbPress. You can do this by doing what Necati above you said. Then you can just follow the steps I have listed above.

@Necati:

Thanks for posting that for everyone! My instructions weren’t the clearest!

[EDIT]

I decided to post the full code again for clarity’s sake.

On line 2 in bb-config.php (located in your bbPress forum install), add this:

require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');

Now, add this to your bbPress theme’s functions.php (if you do not have a functions.php file in your bbPress theme folder, create one!)

function recreate_bb_admin_bar() {
echo '<div id="wp-admin-bar">';
bp_adminbar_logo();
echo '<ul class="main-nav">';
bp_adminbar_login_menu();
bp_adminbar_account_menu();
bp_adminbar_blogs_menu();
bp_adminbar_notifications_menu();
bp_adminbar_authors_menu();
bp_adminbar_random_menu();
echo '</ul></div>';
}
add_action('bb_foot', 'recreate_bb_admin_bar');
add_action('bb_admin_footer', 'recreate_bb_admin_bar');
add_action( 'bb_head', 'bp_core_admin_bar_css', 1 );
add_action( 'bb_admin_head', 'bp_core_admin_bar_css', 1 );

I also made one last change to the function because it wasn’t XHTML validating before! See if you can spot the change ;)

Skip to toolbar