BuddyDev

Search

[Resolved] How can I Remove BbPress Replies From Buddypress Activity

Tagged: 

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #30708

    Is there a simple way that’s I can stop bbpress replies from showing in the buddypress activity area, I prefer only the bbpress topic to show but not the reply

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2909
    Ravi on #30711

    Hello Adeala,

    Thank you for posting. There is not a direct setting to prevent the recording of activity based on type. Yet, You can achieve this using code. Try the following code in your “bp-custom.php” file.

    
    /**
     * Modify activity args
     *
     * @param array $r Activity args.
     *
     * @return bool
     */
    function buddydev_modify_record_activity_args( $r ) {
    
    	if ( $r['type'] && in_array( $r['type'], array( 'bbp_reply_create', 'bbp_reply_edit' ) ) ) {
    		$r = false;
    	}
    
    	return $r;
    }
    add_filter( 'bbp_after_record_activity_parse_args', 'buddydev_modify_record_activity_args' );
    

    Let me know if it works or not.

    Regards
    Ravi

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #30715

    Thanks that’s worked, lovely help

    Secondly please
    How can I get favorite count to display on my site header

    I need something like this
    favorite (1) ,Mention (1)

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #30717

    Please do not use same topic for continuous questions. It makes the topic useless for others and makes our efforts of community support unworthy of the time.

    Please open a new topic for unrelated issues.

    Thank you
    Brajesh

  • Inactive
    Level: Enlightened
    Posts: 28
    Kikismedia on #30724

    Sorry about that

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #30741

    No issues.

The topic ‘ [Resolved] How can I Remove BbPress Replies From Buddypress Activity’ is closed to new replies.

This topic is: resolved