bp_search_pagination_page_counts( $total_items,  $items_per_page,  $curr_paged )

Outputs BuddyBoss pagination number viewing and total

Description

Return

(mixed|void)

Source

File: bp-search/bp-search-functions.php

function bp_search_pagination_page_counts( $total_items, $items_per_page, $curr_paged ) {

	if ( $curr_paged == 0 ) {
		$curr_paged = 1;
	}

	$to_num   = $curr_paged * $items_per_page;
	$from_num = $to_num - ( $items_per_page - 1 );

	?>
	<div class="pag-count bottom">
		<div class="pag-data">
			<?php printf( __( 'Viewing %d - %d of %d results', 'buddyboss' ), $from_num, min( $total_items, $to_num), $total_items ); ?>
		</div>
	</div>
	<?php
}

Changelog

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.