BP_Search::print_results()

Description

Source

File: bp-search/classes/class-bp-search.php

888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
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.