Do you want to remove the search in BBPress forums?
There are many scenarios where you want to restrict a user to search through your forums. I encountered one of them when one of my clients asked me to remove the search bar from the forums.
I used the below code to remove the search bar from the top of the BBPress forums.
php
/**
* Remove Search Bar in BBPress Forums
*
* @param array $param
* @return bool
*/
function maverick_bbp_no_allow_search($param)
{
return false;
}
add_filter('bbp_allow_search', 'maverick_bbp_no_allow_search');
Or you can use the below code.
php
/**
* Remove Search Bar in BBPress Forums
*/
add_filter( 'bbp_allow_search', '__return_true' );