BuddyPress tutorial: get name, profile category and type of account

Hi guys! In this tutorial I will explain how you can get name, profile category, type of account and other informations from BuddyPress Extended Profile.

To get this information, you ca use this function:

<?php echo xprofile_get_field_data(6,$userid); ?>

So, if you want to display Profile Category for each user, go to phpmyadmin and open wp_bp_xprofile_fields table. There you can find in the parent_id column the id for any field. This id you can use to display information.

<?php echo xprofile_get_field_data($id,$userid); ?>

So, if Profile Category has parent_id value 6, you can get it in this way:

<?php echo xprofile_get_field_data($id,$userid); ?>

In this way you can display  name, profile category, type of account, etc. for each user!

Leave a Comment