Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

How to generate BuddyBar/WP menu links, to place somewhere else in theme? (4 posts)

Started 8 months, 2 weeks ago by: InterMike

  • Profile picture of InterMike InterMike said 8 months, 2 weeks ago:

    Anyone know what the code is to generate the links in the BP/WP Bar? So I could, for example, disable the BP/WP Bar, and stick those thinks (Activity, Forums, Groups, Settings, Profile, Logout, etc.) in my theme elsewhere. I could hard code it, but then you wouldn’t be able to generate each member’s name (which shows up in the URL for each.)

  • Profile picture of valuser valuser said 8 months, 2 weeks ago:

    for members, groups etc i have used

    <a href="<?php echo get_blog_option( BP_ROOT_BLOG, 'siteurl') ?>/members/">Members</a>

    and for specific members, groups etc i have used (say for a member’s profile)

    <a href="<?php echo get_blog_option( BP_ROOT_BLOG, 'siteurl') ?>/members/<?php $userObject = wp_get_current_user(); $userName = $userObject->display_name; echo $userName;?>/profile" >My Profile</a>

    and so on

    but mods may refine these as i am making it up as i go !

  • Profile picture of InterMike InterMike said 8 months, 2 weeks ago:

    Thanks @valuser. I also found out more about it here: http://bit.ly/r2akXB

  • Profile picture of Boone Gorges Boone Gorges said 8 months, 2 weeks ago:

    The BuddyBar builds those links mostly out of $bp->bp_nav and $bp->bp_options_nav (which are also responsible for site navigation in other places). See http://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-buddybar.php#L423

    The WP Admin Bar is built more independently of the BuddyBar. Each component essentially does its own work. See for instance http://buddypress.trac.wordpress.org/browser/trunk/bp-groups/bp-groups-loader.php#L370