Code
Source: http://pastebin.com/raw/QByiEAhH
This snippet should be added to wp-content/themes/kleo-child/functions.php
Note : You will have to adapt this function for your needs by changing the name of the fields Location and Specialization from the example shown. Field names are case sensitive and must match exactly.
Examples :
$location = bp_get_member_profile_data('field=Location');
$specialization = bp_get_member_profile_data('field=Specialization');
field=Location
represents name of the field that we need to show in the member directory
field=Specialization
represents name of another field that we need to show in the member directory