How to count the number of result in a members loop?
-
if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=12&exclude=1,2,3' ) ) : do_action( 'bp_before_directory_members_list' ); while ( bp_members() ) : bp_the_member(); // print loop output here endwhile; do_action( 'bp_after_directory_members_list' ); bp_member_hidden_fields(); else: // found nothing endif;
the code above is a basic example of custom members loop, with a defined posts_per_page and a number of IDs to exclude.
Question:
How do I get the total number of the result?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.