Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable Buddypress Sitewide Activity RSS

  • Avatar of tse11
    tse11
    Participant

    @tse11

    I have perused the forums and have only found some very old topics on how to disable the newsfeed for sitewide activity. I placed the following code in my functions.php but if I go to the link, the newsfeed is still there.

    function bp_remove_feeds() {
    	remove_action( 'wp', 'bp_activity_action_sitewide_feed', 3 );
    	remove_action( 'wp', 'bp_activity_action_personal_feed', 3 );
    	remove_action( 'wp', 'bp_activity_action_friends_feed', 3 );
    	remove_action( 'wp', 'bp_activity_action_my_groups_feed', 3 );
    	remove_action( 'wp', 'bp_activity_action_mentions_feed', 3 );
    	remove_action( 'wp', 'bp_activity_action_favorites_feed', 3 );
    	remove_action( 'wp', 'groups_action_group_feed', 3 );
    }
    add_action('init', 'bp_remove_feeds');

    I have my site as a private community so having the newsfeed readily available to anyone who knows all they have to type in is /activity/feed is not very secure for my members. Any help on how to get rid of it would be greatly appreciated.

    Using: latest Buddypress and WordPress

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of aces
    aces
    Participant

    @aces

    @tse11

    try replacing the ‘wp’ with ‘bp_actions’

    function bp_remove_feeds() {
    	remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed', 3 );
    	remove_action( 'bp_actions', 'bp_activity_action_personal_feed', 3 );
    	remove_action( 'bp_actions', 'bp_activity_action_friends_feed', 3 );
    	remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed', 3 );
    	remove_action( 'bp_actions', 'bp_activity_action_mentions_feed', 3 );
    	remove_action( 'bp_actions', 'bp_activity_action_favorites_feed', 3 );
    	remove_action( 'groups_action_group_feed', 'groups_action_group_feed', 3 );
    }
    add_action('bp_init', 'bp_remove_feeds');
    Avatar of tse11
    tse11
    Participant

    @tse11

    @aces Thanks much, that was a great idea. Unfortunately it didn’t work. There has got to be a way to at least make these feeds private. If anyone knows, please let me know.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @tse11
    Use init hook instead of bp_init! Place in bp-custom.php :

    http://codex.buddypress.org/plugindev/bp-custom-php/

    
    function pcfbp_lite_cut_nonreg_visitor_rss_feed() {
    	if ( !is_user_logged_in() ) {
    		remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' ,3      );
    		remove_action( 'bp_actions', 'bp_activity_action_personal_feed' ,3      );
    		remove_action( 'bp_actions', 'bp_activity_action_friends_feed'  ,3      );
    		remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed',3      );
    		remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' ,3      );
    		remove_action( 'bp_actions', 'bp_activity_action_favorites_feed',3      );
    		remove_action( 'groups_action_group_feed', 'groups_action_group_feed',3 );
    	}
    }
    add_action('init', 'pcfbp_lite_cut_nonreg_visitor_rss_feed'); 
    

    Make sure the single quotes are not being modified if you are copying and pasting the code!

    Avatar of tse11
    tse11
    Participant

    @tse11

    @bphelp Thanks, unfortunately that didn’t work either.

    For anyone wondering. I found a plugin that finally blocks the BP feeds. It is for wordpress but did the trick. The plugin is here:

    http://wordpress.org/plugins/disable-feeds/

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

You must be logged in to reply to this topic.