Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To: Remove “All Members” Activity Feed


  • zsauce
    Participant

    @zsauce

    After much research through many old threads, using the combination of a few, I figured out how to remove the “All Members” view of the Activity feed.

    I originally tried a solution posted by paulhastings0 on the page https://buddypress.org/support/topic/change-the-default-activity-tab/

    However, as a member in that thread posted a few comments later, this only changes the default selection of the tab, it does not in fact change the feed that is loaded. So the tab said “My Friends” (or whatever tab you set as selected), but the feed that loaded was still the “All Members” feed.

    The second option I found (which I can’t find again to link to while writing this) only removed the “All Members” tab option, but simply left the tab as a blank space, while still loading the “All Members” feed.

    If you combine the two solutions however, it works like a charm!

    So, here’s the solution:

    You should be working in the BP Child theme.
    1) Copy the index.php file from ../wp-content/themes/boss/buddypress/activity
    2) Paste the index.php into your ../wp-content/themes/boss-child/buddypress/activity directory (it doesn’t exist, so you’ll have to create it)
    3) Use the first solution by paulhastings0 in the old thread to change which tab is default selected by removing class="selected" from the <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'boss' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'boss' ), bp_get_total_member_count() ); ?></a></li> line (on line 24) and add class="selected" to the new tab you want selected (I chose the “My Friends” tab, so for me it was <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of my friends only.', 'boss' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'boss' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li> on line 34.
    4) Now, delete the <li id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'boss' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'boss' ), bp_get_total_member_count() ); ?></a></li> code from line 24.

    Hope this saves someone from hours of searching like I did!

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

  • u_Oi
    Participant

    @arutam

    I think you can use CSS and display:none; as well


    Kristian Yngve
    Participant

    @kristianngve

    What would it be for the CSS?

    This down;t work:

    .all-members {
    display: none;
    }

    (because I am not using the Buddypress theme to do it his way).


    lougrossi
    Participant

    @lougrossi

    li#activity-all.dynamic {
      display: none;
    }

    songdove
    Participant

    @songdove

    So if I am using a theme of my own choosing, and want to remove “all members” content so that only groups/events/friends/other stuff I want posted to the main feed shows only as it relates to a person’s friends, groups, pages, etc that they’ve interacted with, (like how FB does the main feed) I’d insert that css line from @lougrossi ? I want to be sure I am showing all content a user has made themselves party to, or that admin has made public, such as a public group’s activity the member joined, but not see anything from anyone they don’t know or are not in active participation with. (not part of the same public group for example)

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar