Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable All RSS Feeds – update


  • Oscar Estepa
    Participant

    @estepix

    Hi,

    I have a site using buddypress 2.4.3 where all buddypress functionality must be private (requires login) while the blog part is public.

    The problem is that the Activity feed was being crawled by feedly and other services, thus breaking our users privacy.

    Searching on google I found out this topic:

    https://buddypress.org/support/topic/disable-all-rss-feeds/

    And when trying to apply the fix I realised the code was outdated, therefore I leave here the updated code:

    
    function cherrypick_custom_bp_remove_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('bp_actions', 'groups_action_group_feed');
    }
    add_action('init', 'cherrypick_custom_bp_remove_feeds');
    

    And on pastebin:

    http://pastebin.com/zaiGH4Dr

    I can confirm it is working fine on:

    • WordPress 4.4.2
    • BuddyPress 2.4.3

    Hope this is helpful!

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

  • @mcuk
    Participant

    @mcuk

    Thanks @estepix,

    Any ideas why the WP hook wasn’t working for this?

    (My site not live yet so unable to test, but been looking into the search engine etc site crawling for when it is)


    Oscar Estepa
    Participant

    @estepix

    No particular reason, Buddypress 2.4.3 is using ‘bp_actions’ hook to add its actions instead of ‘wp’ and according to WordPress you need to use the exact same hook with the exact same priority in order to remove a previously inserted action, i.e., now BuddyPress is adding its functions as:

    add_action('bp_actions', 'bp_activity_action_sitewide_feed');

    See wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php (L530).

    Therefore, they need to be removed using the exact same syntax:

    remove_action('bp_actions', 'bp_activity_action_sitewide_feed');


    @mcuk
    Participant

    @mcuk

    Ahhh thanks @estepix!


    Oscar Estepa
    Participant

    @estepix

    No problem! hope it helps!!!


    Roed
    Participant

    @michaelroed

    Does this only remove the RSS functions or also the visible RSS link seen at the front end? Reason for asking is that I have put this code in my functions.php but nothing has happend at the front end.
    I was looking to remove the RSS link in the groups but it is still there?!


    danbp
    Participant

    @danbp

    The function is working but doesn’t remove the RSS buttons.
    You can hide them with CSS. Something like .feed {display:none!important;}


    Roed
    Participant

    @michaelroed

    Perfect.
    Thank you.


    autox420
    Participant

    @autox420

    Where do i add this code?


    Roed
    Participant

    @michaelroed

    In your custom functions.php file


    elliotyamoah
    Participant

    @elliotyamoah

    Hi, I hope this is still on topic. I’m looking for something like a cross-domain member type. In this case the activity feed from one BuddyPress site would feature on another BuddyPress site. Please check out the post here

    Extended Community

    Thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Disable All RSS Feeds – update’ is closed to new replies.
Skip to toolbar