Is it possible to call bp_get_options_nav() for a specific group ? I need to get the same in-group navigation in every post with a defined post type.
Posts are associated with Groups by slugs and both the group has a meta of post id and the post has a meta of group id (Groups were created from posts), and I’m trying to make the navigation between them seamless.
Read This url:-
http://www.generalthreat.com/2011/10/creating-a-buddypress-group-home-page/
https://wordpress.stackexchange.com/questions/58485/adding-navigation-item-page-for-quick-chat-plugin-to-each-of-my-buddypress-group
Or Try
Creating a BuddyPress Group Home Page
Step One: Create an Activity tab for the activity stream, since weâre displacing it.
To do this, weâre going to use parts of the Group Extension API to create a new nav item for the group.
In your themeâs functions.php, add the following:
That adds a tab called âActivityâ to every groupâs navigation bar, pointing to a page called âactivityâ within the group. This new activity page is calling the same groups/single/home.php template file as the current home page. That template actually handles routing for ALL group pages, as weâll see in a minute.
Step Two: Create a template file for your group Home page
If youâre going to have a Group home page, you need to control how itâs displayed. To do that, youâll need a template file in your themeâs groups/single directory. It can be called whatever youâd like, but for this guide, weâre sticking with front.php.
Create this file and put whatever you want in it. This template will be in the âgroup loopâ, so you can use functions like bp_group_description() to display group info.
Hereâs an example:
Up to now, all weâve done is create a new Activity tab on the group page that doesnât even show the activity stream. But this last piece will make everything work:
Step Three: Edit your themeâs groups/single/home.php template file
Look for this section in your home.php file:
This directs a visitor to either the activity stream or the member list, depending on whether activity has been enabled. Itâs a catch-all routing section, and itâs where weâll be adding our group home page.
Change the lines above to:
This enables the Activity tab AND sends requests for the group home page to your new template! Of course, if you used a name other than front.php, youâll need to change that line to match the name you chose.
Update! Step Four â Let BuddyPress JS know how to classify your new activity posts
Now you can make activity updates, but BuddyPress wonât remember that they came from your group. In order to fix that, we need to relax a check in another file, activity/post-form.php.
Without those hidden fields, BuddyPress thinks weâre just posting a personal status update. So letâs expand that to cover our new Activity page:
Now BuddyPress will tie the update to a group no matter where in the group we post it.
Thatâs it! Check out your new group home page and enjoy the results your BuddyPress hacking chops. And if you do something really cool with a group Home page, send a link my way!