Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8325843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:34:21+00:00 2026-06-09T00:34:21+00:00

Is it possible to call bp_get_options_nav() for a specific group ? I need to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:34:23+00:00Added an answer on June 9, 2026 at 12:34 am

    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

    enter image description here

    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:

    function add_activity_tab() {
        global $bp;
    
        if(bp_is_group()) {
            bp_core_new_subnav_item( 
                array( 
                    'name' => 'Activity', 
                    'slug' => 'activity', 
                    'parent_slug' => $bp->groups->current_group->slug, 
                    'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 
                    'position' => 11, 
                    'item_css_id' => 'nav-activity',
                    'screen_function' => create_function('',"bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );"),
                    'user_has_access' => 1
                ) 
            );
    
            if ( bp_is_current_action( 'activity' ) ) {
                add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( 'Activity' ) . '";' ) );
                add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( 'Activity' ) . '";' ) );
            }
        }
    }
    
    add_action( 'bp_actions', 'add_activity_tab', 8 );
    

    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:

    <div class="home-page single-group" role="main">
    <?php if(bp_is_item_admin()) { ?>
        <div class="notice info">
            <p>Welcome to your group home page!<br />
            Click <a href="<?php bp_group_admin_permalink() ?>">Admin</a> above to set the content for this page.</p>
        </div>
    <?php } ?>
    <?php bp_group_description(); ?>
    </div>
    

    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:

    elseif ( bp_group_is_visible() && bp_is_active( 'activity' ) ) :
        locate_template( array( 'groups/single/activity.php' ), true );
    
    elseif ( bp_group_is_visible() ) :
       locate_template( array( 'groups/single/members.php' ), true );
    

    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:

    elseif ( bp_group_is_visible() && bp_is_group_activity() ) :
        locate_template( array( 'groups/single/activity.php' ), true );
    
    elseif ( bp_group_is_visible() ) :
        locate_template( array( 'groups/single/front.php' ), true );
    

    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.

    <?php elseif ( bp_is_group_home() ) : ?>
    
        <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
        <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" />
    
    <?php endif; ?>
    

    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:

    <?php elseif ( bp_is_group() ) : ?>
    
        <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
        <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" />
    
    <?php endif; ?>
    

    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!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to call an exe file and get result from it? (basic)
It is possible to call a table-valued function directly, or do I need to
Possible Duplicate: Call Python From PHP And Get Return Code probably a very stupid
Possible Duplicate: how can I call javascript function from another project in same solution?
Is it possible to call a method on the type you pass into your
Possible Duplicate: Call-time pass-by-reference has been deprecated; My Kohana site, get this alert in
Is it possible to call a task which is defined in a Rakefile -
How is it possible to call a client side javascript method after a specific
Is it possible to call a constructor from another (within the same class, not
Is it possible to call a method in java at specific time? For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.