Try using function groups_get_groups
– found in bp-groups/bp-groups-functions.php
Do you mean xprofile fields?
Yea it is xpofile what i mean actually i got it a solution, i was looking around the buddypres register file as there they need to show all the xporfile from the first group then i just changed it to my needs and used it and it worked ! Ty for all the help.
I let the solution here:
if ( bp_is_active( 'xprofile' ) ) {
if ( bp_has_profile( array('fetch_field_data' => false ) ) ){
while ( bp_profile_groups() ) {
bp_the_profile_group();
while ( bp_profile_fields() ) {
bp_the_profile_field();
//bp_get_the_profile_field_name() for get the name
//bp_get_the_profile_field_id() for get the id
}
}
}
}