BP_Search::print_results()
Description
Source
File: bp-search/classes/class-bp-search.php
public function print_results() {
if ( $this->has_search_results() ) {
$current_tab = $this->search_args['search_subset'];
foreach ( $this->search_results[ $current_tab ]['items'] as $item_id => $item ) {
echo $item['html'];
}
if ( $current_tab != 'all' ) {
$page_slug = untrailingslashit( str_replace( home_url(), '', $this->search_page_url() ) );
bp_search_pagination_page_counts(
$this->search_results[ $current_tab ]['total_match_count'],
$this->search_args['per_page'],
$this->search_args['current_page']
);
bp_search_pagination(
$this->search_results[ $current_tab ]['total_match_count'],
$this->search_args['per_page'],
$this->search_args['current_page'],
$page_slug
);
}
} else {
bp_search_buffer_template_part( 'no-results' );
}
}
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.