This topic has 15 replies, 2 voices, and was last updated 8 years by Laura.

  • Author
  • #106607
     jazzbuzz
    Participant

    Hi there,

     

    I would like to hide certain info from activity stream.

     

    Used your snippet from the blog but does not work. I keep getting a white page after submitting functions.php.

     

    Where is the issue?

     
    //Block certain activity types from being added
    function bp_activity_dont_save( $activity_object ) {
    $exclude = array(
    ‘updated_profile’,
    ‘new_member’,
    ‘new_avatar’,
    ‘friendship_created’,
    ‘joined_group’
    );

     

    Thank you 🙂

    #106937
     Laura
    Moderator

    Hello, have you tried https://wordpress.org/plugins/buddypress-block-activity-stream-types/ ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #106961
     jazzbuzz
    Participant

    Hi Laura,

    the plugin hasn´t been updated in two years so I prefer not to use it 🙁

    you published the php snippet already but it does not seem to work. Could you not check it for me please?

    Thank you 🙂

    #107120
     Laura
    Moderator

    Hello, did you try adding the code to bp-custom.php ( in plugins folder )
    Let me know 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #107126
     jazzbuzz
    Participant

    It keeps showing me a white page and I cannot find an error in the code. Could you please check it again?

    Thank you 🙂

    #107235
     Laura
    Moderator

    Hello, you could try with this, go to the main theme files, copy the file activity-loop.php found buddypress – activity
    and go to the child theme, create 2 new folders, “buddypress” and inside create a new folder “activity” now paste the file and edit it

    Find

    COPY CODE
    
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
    

    Replace it with

    COPY CODE
    
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&action=activity_update' ) ) : ?>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #107259
     jazzbuzz
    Participant

    Hi Laura,

    I do not have such a file. See image attached.

    Attachments:
    You must be logged in to view attached files.
    #107370
     Laura
    Moderator

    Hello, please check inside the main theme files

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #107371
     jazzbuzz
    Participant

    I did and I do not have it 🙁

    #107372
     jazzbuzz
    Participant

    Alright my bad… you meant to go to the theme folder not to the plugin folrder.. will try now 😉

    #107374
     jazzbuzz
    Participant

    Did everything like you said. Tried below code in functions.php and bp-custom.php but keep getting a white page even after changing the activity-loop.php 🙁

    Where is the issues? 🙁

    COPY CODE
    //Block certain activity types from being added
    function bp_activity_dont_save( $activity_object ) {
    $exclude = array(
    'updated_profile',
    'new_member',
    'new_avatar',
    'friendship_created',
    'joined_group'
    );
    
    #107517
     Laura
    Moderator

    What code did you add to activity loop?
    Delete the old code above and only change activity loop as i mentioned before 🙂
    Let me know

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #107563
     jazzbuzz
    Participant

    I did but what is it doing now, how I can hide certain activities from activity stream?

    #107648
     Laura
    Moderator

    Hello, the code should only show profile updates at the activity

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #107650
     jazzbuzz
    Participant

    Hi Laura,

    it does indeed. Thank you.

    Could you tell me all the events it is showing now?

    #107741
     Laura
    Moderator

    Hello, only profile updates, nothing else 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

Viewing 16 posts - 1 through 16 (of 16 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?