Skip to:

[Resolved] Only friends/you in activity feed…has solution been found?

  • Vcize


    For the last few days, I have been attempting to setup my activity feed similar to that of facebook where you can only see your friends and your own activities in the feed. I’ve read through dozens of posts on the topic, and have yet to find a solution. Is there one out there that exists and actually works?

    Here are the potential solutions I’ve seen brought up and the problems with them…

    1) Modify the activity loop.

    Why it doesn’t work: As far as I can tell, the function that filters the activity loop will only take one parameter, meaning you can filter by either friends activities OR your own, but not both.

    2) Buddypress Activity Privacy Plugin.

    Why it doesn’t work: Lots of people point to this as a solution, but as far as I can tell from messing around with it, it isn’t.

    Firstly, permissions can only be set when POSTING, not when VIEWING. That means if some random guy decides to post an update to everyone then I see it in my feed, even if I am not friends with him.

    Secondly, it only appears to work for some activities, like posting updates. If you change your avatar it will automatically be visible to everyone, not just your friends. This is true even if you remove the “everyone” option.

    3) WPMU plugin

    WPMU had a plugin a while back for accomplishing exactly this (only friends in yourself in activity feed). However, it was abandoned several years ago and now refers users to the BP Activity Privacy plugin mentioned above in #2, which as I explained does not actually accomplish the same thing.

    So, has anyone come up with a solution for this? I’m really surprised that I can’t seem to find anything given how often people seem to be looking for it.

Viewing 3 replies - 1 through 3 (of 3 total)

  • shanebp


    That should be a simple task using the ‘include’ parameter in the activity loop.

    But I just tried it and couldn’t get it to work.

    Perhaps I did something dumb…



    It is simple, if you use the correct parameter, anyway…

    Create a template overload of this file:

    Then change this:
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>

    To this:

    $friends = friends_get_friend_user_ids( bp_loggedin_user_id() );
    $friends[] = bp_loggedin_user_id();
    $friends_and_me = implode( ',', (array) $friends );
    $friends_and_me =  '&user_id=' . $friends_and_me;
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $friends_and_me) ) :  ?>

    Creating a template overload:

    Theme Compatibility & Template Files



    so good thanks for this

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Only friends/you in activity feed…has solution been found?’ is closed to new replies.
Skip to toolbar