Hey
I have a problem hiding comments in the activity stream.I changed the js code
in “buddypress.min.js” in two places.
like here: https://kainelabs.ticksy.com/article/14148
Everything works until I go to the bottom of the stream and new posts are loaded. then the comments are no longer hidden. Please helpHello Rav,
Thank you for posting. There are other better ways to hide activity comments in the activity stream.
BuddyPress offers “display_comments” feature to hide activity comments. Please check the following example which will hide comments on activity directory page.add_action( 'bp_after_has_activities_parse_args', function ( $r ) { if ( ! bp_is_activity_directory() ) { return $r; } $r['display_comments'] = false; return $r; } );
Regards
RaviHi Rav,
Are you using Youzer or is it default BuddyPress template pack? Which template pack you are using? Bp Legacy or Nouveau?Regards
BrajeshHello Rav,
Thank you for the acknowledgement. Please let me know in which file you place this code. Also, which activity page like Activity directory, Member’s activity page or Group’s activity page you are trying to disable comment.
Please share the code you are using.
Regards
RaviI have tried something like this but it deletes comments (does not collapse) and the same stream posts are still loading
function hide_comments(){ if ( ! bp_is_activity_directory() ) { return $r; } $r['display_comments'] = false; return $r; }' add_action( 'bp_after_has_activities_parse_args', 'hide_comments');
- This reply was modified 4 years, 7 months ago by rav.
You must be logged in to reply to this topic.