Reply To: How to filter the members directory by XProfile Fields
One solution might be to simply display the xprofile fields, that you want to be searcable in the member directory.
Then you can simply use the member search form to search for xprofile content.
My members have a field with ‘school’ http://historielaerer.dk/medlemmer/
This snippet adds two profile fields to the members loop – add the code to your bp-custom.php:
<?php
function add_info_to_members_loop() {
$field_content = bp_get_member_profile_data( 'field=(Xprofile Field name)' );
if( $field_content != false )
echo "(label for xprofile field content): " . $field_content;
$field_content = bp_get_member_profile_data( 'field=(Xprofile field name #2' );
if( $field_content != false )
echo "<br/>" . $field_content;
}
add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );
?>
Just an idea.
Kind regards, Lars