Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Editing groups nav #19811
     britcunning
    Participant

    Found code to change the default landing tab for each group.

    COPY CODE
    add_filter('bp_groups_default_extension','bpdev_custom_group_default_tab');
     
    function bpdev_custom_group_default_tab($default_tab){
     
    $group=groups_get_current_group();//get the current group
     //if current group is not set, return the default tab
     if(empty($group))
     return $default_tab;
     
    // you may create a switch/if else to default to some other tab based on group slug or group id whichever you prefer
     //here I am testing agains slug
     switch($group->slug){//to test against group id use $group->id
     
    case 'family-law'://the group sug
     $default_tab='members';//the landing component
     break;
     
    case 'study-group'://the group slug
     $default_tab='forums';//the landing component
     break;
     //go ahead add some more

    Still cannot figure out how to unset the “home” tab. Any assistance there would be helpful.

Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?