Thanks, Brajesh,
Appreciate your kind assistance.
The simple logic I’m trying to achieve is to
allow comments from “community” category blog posts only
and disallow comments from any other category.Can’t wait to test your suggestions tomorrow.
Will keep you posted.Once again – big thank you!
Plamen
Hi Plamen,
Thank you.Please use the code from my last reply. I am addin git below too
function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) { // use $post_id to decide. // set $enabled= false; to stop recording comment. if ( ! in_category( 'community', $post_id ) ) { $enabled = false; } return $enabled; } add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );
It wills top recording activity for comments which are not on posts from ‘community’ category.
Regards
BrajeshThank you, Brajesh,
Working just the way I wanted now.
Bow down to your level of expertise
and thank you again for your help and kind support.All the best,
Plamen
Hi Plamen,
Thank you for the kind words.I am glad I could assist.
Have a nice day.
Regards
Brajesh
The topic ‘ [Resolved] Activity Sitewide stream filter posts by category’ is closed to new replies.