bp_member_type_directory()
Displays a user by it’s type.
Description
Source
File: bp-members/bp-members-functions.php
function bp_member_type_directory() { $member_types = bp_get_active_member_types(); foreach ( $member_types as $member_type_id ) { if ( !get_post_meta( $member_type_id, '_bp_member_type_enable_filter', true ) ) { continue; } $type_name = bp_get_member_type_key( $member_type_id ); $type_id = bp_member_type_term_taxonomy_id( $type_name ); $members_count = count( bp_member_type_by_type( $type_id )); $member_type_name = get_post_meta( $member_type_id, '_bp_member_type_label_name', true ); if ( empty( $type_id ) ) $type_id = 0; ?> <li id="members-<?php echo $type_id; ?>"> <a href="<?php echo bp_member_type_directory_permalink( $type_name ); ?>"><?php printf( '%s <span>%s</span>', $member_type_name, $members_count ); //@todo no variables in the text domain please ?></a> </li><?php } }
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.