Reply To: Forum Search Exclude Archived
untested, but this should do it
add_filter ('bbp_after_has_search_results_parse_args', 'my_function')
my_function ($args) {
// bbp_get_closed_status_id() REMOVED,
$post_statuses = array(
bbp_get_public_status_id(),
bbp_get_spam_status_id(),
bbp_get_trash_status_id()
);
// Add support for private status
if ( current_user_can( 'read_private_topics' ) ) {
$post_statuses[] = bbp_get_private_status_id();
}
// Join post statuses together
$args['post_status'] = implode( ',', $post_statuses );
return $args ;
}