Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can you run multiple profile loops in single/profile-loop.php ?


Boone Gorges
Keymaster

@boonebgorges

Inside of the while( bp_profile_groups() ) loop for each member, check to see if bp_the_profile_group_name() is one that should be displayed to that particular user. In other words, put the template markup inside of a big conditional:

if ( bp_the_profile_group_name() == 'awesome' && get_usermeta( $bp->loggedin_user->id, 'awesome_user' ) ) {
// Show the profile fields in the 'awesome' group only for those users with the usermeta 'awesome_user'
}

Do that for each user type and each profile field group. Only the right stuff will be displayed; groups not meeting the criteria will be hidden.

Skip to toolbar