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
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.
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.
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 🙂
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