This topic has 3 replies, 2 voices, and was last updated 7 years by Kieran_SQ.

  • Author
  • #202392
     UTA user
    Participant

    Dear support team,

    is there a way to make the “My Groups” tab default view on the sidewide activity page?

    Please see the screenshot for clarification.

    Thank you!

     

    Best,

    Rebecca

    #202461
     Kieran_SQ
    Moderator
    Hi Rebecca, Thanks for contacting us about setting my groups as the default tab when the activity page loads. I have looked into this and create the code below which should work. Please copy the code from the ticket (not the email) and add it to WP Admin > Appearance > Editor > KLEO Child > Functions.php
    function sq_set_groups_as_default_for_activity_feed() {
        if (! is_user_logged_in() ) {
            return ;
        }
        if (! bp_is_activity_directory() ) {
            return ;
        }
        $tab = 'personal';
        setcookie( 'bp-groups-scope', 'personal', null, '/' );
        $_COOKIE['bp-groups-scope'] = $tab;
    }
    add_action('bp_template_redirect', 'sq_set_groups_as_default_for_activity_feed');
    Make sure to purge your website cache entirely, any CDN and your front-end cache (Ctrl+F5) to see the changes. Thanks, Kieran
    #203760
     UTA user
    Participant
    Not marked as solution
    #203775
     Kieran_SQ
    Moderator
    Not marked as solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?