navigation bar in BuddyPress in BBPress
-
Is there a way to have the top navigation bar from BuddyPress (that shows My Account, Notifcations, etc.) also show when using the bbPress forum? It seems this makes sense if there were really integration between bbPress and BuddyPress.
Thanks
-
This is probably possible through a custom plugin. But you probably want to ask over at the Buddypress forums…
I posted this a few weeks back. Someone was going to post a “how to” of exactly that:
Doesn’t look like the linked-to pages have been updated yet.
allen force the loading of adminbar… see this 3d: https://buddypress.org/forums/topic.php?id=1152#post-16955
Thanks all, I’ll give this a try.
Best wishes,
Allen
Hmm..it looks like they say to use the functions.php file (for the theme) to add the code, but I don’t see such a functions file…am I missing something obvious?
If it doesn’t exist, go ahead and make one. WordPress and bbPress are designed to look for that file regardless.
Ok..thanks…well, this is what I did, but it doesn’t work. I followed the advice given in the link above:
1. Created a function called functions.php inside my template folder (bb-templates/kakumei/functions.php) and put in it the code:
function recreate_bb_admin_bar() {
echo ‘<div id=”wp-admin-bar”><ul class=”main-nav”>’;
bp_adminbar_logo();
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 ‘</div>’;
}
add_action( ‘wp_footer’, ‘recreate_bb_admin_bar’, 8 );
add_action( ‘admin_footer’, ‘recreate_bb_admin_bar’ );
add_action( ‘wp_head’, ‘bp_core_admin_bar_css’, 1 );
2. Added to my bb-config.php file, this line
require_once(‘../wp-blog-header.php’);
Am I still missing something? Thanks
yes add in header.php wp_head() and in the footer.php wp_footer() the first before </ head> and the second before </ body>
thanks..just did that and get
Fatal error: Call to undefined function wp_head() in /home/alumnide/public_html/forum/bb-templates/kakumei/header.php on line 33
am I still missing some code?
nevermind…forgot to put in the
require_once(‘../wp-blog-header.php’);
this seems to work fine, but I’ve noticed another problem…when you go to the admin page to administer the forum, I get a failure again, like this:
Warning: require_once(../wp-blog-header.php) [function.require-once]: failed to open stream: No such file or directory in /home/alumnide/public_html/forum/bb-config.php on line 5
Fatal error: require_once() [function.require]: Failed opening required ‘../wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/alumnide/public_html/forum/bb-config.php on line 5
has anybody else gotten past this error?
use this:
require_once( $_SERVER . ‘/wp-blog-header.php’ );
Thank you! That works.
Hi guys,
FYI, I’ve updated the code for the BuddyPress bar in bbPress:
https://buddypress.org/forums/topic.php?id=1152#post-18510
It uses bbPress’ header and footer hooks, instead of WordPress’.
The BP bar now also works in the bbPress admin area as well!
- You must be logged in to reply to this topic.