Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable Buddypress Sitewide Activity RSS


  • 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 5 replies - 1 through 5 (of 5 total)

  • 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');

    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.


    bp-help
    Participant

    @bphelp

    @tse11
    Use init hook instead of bp_init! Place in bp-custom.php :
    https://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!


    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:

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


    chuckingit
    Participant

    @chuckingit

    @bp-help … thank you for the code snips but can you clarify the last remove action is correct … e.g., remove_action( 'groups_action_group_feed', 'groups_action_group_feed',3 ); shouldn’t this be use the bp_actions thus instead be this – remove_action( 'bp_actions', 'groups_action_group_feed',3 ); ..??..

    also, i noticed that with respect to bbPress, the topics and contents show in the feed – e.g., site.com/forums/feed/ shows the feed titles with some content (maybe excerpt or maybe full text not sure as my test site only has one liners) …

    accordingly, how can we hide the forum feeds … e.g., i thought maybe adding lines like this might work but they did not –

    remove_action( 'bp_actions', 'bbp_display_topics_feed_rss2',3      );
    remove_action( 'bp_actions', 'bbp_display_replies_feed_rss2()',3      );
    

    thanks in advance for any pointers you can share – especially with blocking bbPress Forum Topic contents – site.com/forums/feed/ … cordially, chuck scott

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable Buddypress Sitewide Activity RSS’ is closed to new replies.
Skip to toolbar