Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Remove Activity tab from Groups

  • Avatar of iheartwine
    iheartwine
    Participant

    @iheartwine

    I have checked several solutions but none of them works. I wan to get rid of the activity tab (i don’t know why it’s called HOME in my groups). Not hiding it by css, not turning off (i’m using it for comments in buddypress links). Just remove it from the groups. Help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of Shmoo
    Shmoo
    Participant

    @macpresss

    What are you gonna do with your Groups without Activity system it’s the ‘comments’ part of a group.

    Just to make sure where do you want to delete the activity from showing up.

    example.org/groups/test-group/ * here */
    example.org/members/profile/ * here */

    ?

    You can always remove the activity-loop from the template structure.
    When BuddyPress doesn’t past the activity-loop it will not show up on your site of course.

    Avatar of iheartwine
    iheartwine
    Participant

    @iheartwine

    Thanks Shmoo. My community is based mainly on WP Events manager for groups, BBPress and Buddypress links. I don’t need activity at all (but just like I said, BP Links uses it for comments, so I had to turn it on). So basically I want to get rid of it in both places – in groups and profiles.

    When I will remove activity-loop there is still the link in navigation tabs :/

    Avatar of Shmoo
    Shmoo
    Participant

    @macpresss

    Yeah I was afraid of that too..

    I think I’ve seen some Filter a few days ago to remove a menu-tab. This way you can remove lets say the activity link from popping up on the navigation menu’s.

    Try Google at this: BuddyPress + remove + item + PHP_code_that_prints_the_menu()

    Avatar of iheartwine
    iheartwine
    Participant

    @iheartwine

    I got rid the activity from the profile with this code:

    function bphelp_remove_groups_from_profile(){
    bp_core_remove_nav_item('activity');
    }
    add_action('bp_activity_setup_nav','bphelp_remove_groups_from_profile');

    but still looking for a solution to eliminate it from Group page

    Avatar of iheartwine
    iheartwine
    Participant

    @iheartwine

    I thought it’s a piece of cake for advanced BP-ers :(

    Avatar of Waqas Lone
    Waqas Lone
    Participant

    @waqaslone

    I’m also looking for the same piece of code. Did you find anything yet?

    Avatar of richard-b
    Richard-B
    Participant

    @richard-b

    Just had to do this on an installation, here is the code:

    function bp_group_remove_tabs() {
    	global $bp;
    	if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) 
    	{
    	// Duplicate the line below changing 'home' for each tab you wish to remove	 
             $bp->bp_options_nav[$bp->groups->current_group->slug]['home'] = false;		 		 
    	}
    }
    add_action( 'bp_setup_nav', 'bp_group_remove_tabs', 999 );
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Resolved] Remove Activity tab from Groups’ is closed to new replies.