Add xprofile data to Buddypress members loop on members page

Let’s add some xprofile data to the members loop on the Buddypress members page with a small code snippet.

To start of, we’ll need to construct the xprofile fields in the wordpress backend. Make your way to Users > Profile Fields and add a new field. If you already have an existing xprofile field you’d like to show on the members loop, you’re good to go.

The name for the xprofile field is the one we’ll be using to display the Buddypress user data in the following code snippet.

Copy paste the following code to your function.php or bp-custom.php.

 

Leave a Reply

Your email address will not be published. Required fields are marked *