- InactiveLevel: EnlightenedPosts: 28I want to hide the comment showing in the activity stream alone not on single Activity page I go this code from here add_action( ‘bp_after_has_activities_parse_args’, function ( $r ) { if ( ! bp_is_activity_directory() ) { 
 return $r;
 }$r[‘display_comments’] = false; return $r; 
 } );It worked but on the activity page the comment count disappears please I need your help Lastly How can I remove new comment activity from user activity stream 
- InactiveLevel: EnlightenedPosts: 28Hi Ravi this code also hides comment in the single activity I don’t want that, 
 I want it to hide comment in the activity page alone
- Hello Adeala, - Please try the following code. It will hide comments on activity directory page. - add_action( 'bp_after_has_activities_parse_args', function ( $r ) { if ( bp_is_activity_directory() ) { $r['display_comments'] = false; } return $r; } );- Please le 
- InactiveLevel: EnlightenedPosts: 28
- Hello Adeala, - Try the following code. It will hide comment using css on activity directory. Please remove the previous code - add_action( 'wp_footer', function () { if ( ! bp_is_activity_directory() ) { return; } echo '<style>ul#activity-stream .activity-comments{display: none;}</style>'; } );- Regards 
 Ravi
- Hi Ravi and Adeala, - I am trying to hide/collapse comments on activity page, group pages and user page. The comments will be visible when a user click on “show all comments”. I tried editing the buddypress.js file, by changing the default visble comments from 5 to 1, which did not work. I also tried the above code, it hid the comments on only activity page and clicking on comments do not reveal the comments. Kindly assist , thanks. 
The topic ‘ [Resolved] How can I hide comment from activity page’ is closed to new replies.
