bp_search_search_page_content( $content )
BuddyBoss Search page content.
Description
Source
File: bp-search/bp-search-template.php
function bp_search_search_page_content( $content ){
/**
* Reportedly, on some installations, the remove_filter call below, doesn't work and this filter is called over and over again.
* Possibly due to some other plugin/theme.
*
* Lets add another precautionary measure, a global flag.
* @since BuddyPress 1.1.3
*/
global $bpgs_main_content_filter_has_run;
if( bp_search_is_search() && 'yes' != $bpgs_main_content_filter_has_run ){
remove_filter( 'the_content', 'bp_search_search_page_content', 9 );
remove_filter( 'the_content', 'wpautop' );
$bpgs_main_content_filter_has_run = 'yes';
//setup search resutls and all..
BP_Search::instance()->prepare_search_page();
ob_start();
bp_get_template_part('search/results-page');
$content .= ob_get_clean();
}
return $content;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.