Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to disable all members activity feed and hide site/activity/feed page

  • @minglonaire

    Participant

    There should be a way to hide all members activity feed, most of us dont want that, we just want friends activity. Im truly surprised there is no option for that on buddypress, and I was not able to find a solution, one thread which was asking for the same thing was close without providing a solution.

    How can I disable members activity feed and hid sitename/activity/feed page from public so they cant see it by typing that in.

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • @danbp

    Participant

    Try this to remove ALL activity feeds

    function bpfr_hide_rss_feeds() {	
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' );    
    }
    add_action('init', 'bpfr_hide_rss_feeds');

    This snippet will only show logged in users friends activities (on all activity pages of the site)

    
    function bpfr_filtering_activity( $retval ) {
    	$retval['scope'] = 'friends';		
    		return $retval;
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'bpfr_filtering_activity' );

    Add to bp-custom.php or child-theme functions.php

    More details about this on Codex

    @minglonaire

    Participant

    Hi Danbp,

    thanks for that code, but it did not seem to do anything for me.

    I simply want to get rid of (All Members) tab in activity section and hide mysite.com/activity/feed page so that no one that knows that url can see everything there.

    @danbp

    Participant

    Both snippets are working. If really not for you, double-check that bp-custom.php is correctly using open/close php tags and if your theme doesn’t use some custom rss functions.

    To remove the All members button :
    remove line 19 in buddypress/activity/index.php from within your child theme.

    
    <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.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>

    and add class='selected' to the li containing friends item

    If you remove the feeds display using the snippet, people won’t see anything even if they know the page url. And if this is not satisfying for you, you can write a rewrite rule to add to htaccess.

    @rosyteddy

    Participant

    @minglonaire you can also try https://bp-tricks.com/design/easily-hide-specific-tabs-on-buddypress-member-and-group-pages/ AND remove Activity from Themes > Menu in your wordpress admin dashboard

    @minglonaire

    Participant

    Thanks guys, unfortunately I dont know how to access buddypress/activity/index.php
    Can you point me in the right direction on that? I know the functions.php in edit theme, but how do I access all the files to I can change them. Im hosted by godaddy, can I find this in my WP admin console or is ti somewhere with godaddy? Sorry for the newbie question 🙂

    @minglonaire

    Participant

    and now I managed to crash my site somehow by inputting that code into functions.php and removing it.
    Parse error: syntax error, unexpected ‘}’ in /home/content/p3pnexwpnas06_data03/99/2401299/html/wp-content/themes/kleo-child/functions.php on line 27

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to disable all members activity feed and hide site/activity/feed page’ is closed to new replies.
Skip to toolbar