Reply To: bp_get_member_type() is not working in the loop
Hi @ all,
still it’s not working. Also if I echo bp_get_member_type( bp_get_member_user_id() );.
Here’s my code again to show that I’m in the loop:
<?php do_action( 'bp_before_directory_members_list' ); ?>
<ul id="members-list" class="item-list" role="main">
<?php while ( bp_members() ) : bp_the_member(); ?>
<?php
$user_id = bp_get_member_user_id();
$type = bp_get_member_type( $user_id );
?>
I also tried it with global $bp; and global $wpdb; but without success.
BTW the code by @imath is working great.