Forum Replies Created
-
Hi @danbp, Thanks for all help it will help me more. For myself i made changes to code given by you and i was able filter members(users) according to skills(xprofile field) from this:
function bpfr_field( $skill_field) { //$skill_field imported from do_action function global $bp; // is xprofile component active ? if ( bp_is_active( 'xprofile' ) ) // fetch the user_id $current_user = wp_get_current_user(); $current_user_id = $current_user->ID; $blogusers = get_users( ); //to get all user data from database // Array of WP_User objects. foreach ( $blogusers as $user ) { // fetch the data $sk = xprofile_get_field_data('8', $user->ID); // 8 is a field ID // show the data foreach($sk as $skill){ if ($skill == $skill_field){ echo '<div class="authorinfo"><a href="http://YOUR_URL/members/' . $user->user_login . '/profile" target="_blank">' . $user->display_name . '</a></div>'; //to add link for user profile } } //echo '<span>' . esc_html( ) . ' </span>'; } } add_action( 'myfield', 'bpfr_field');
I made a dropdown to select and skill value and attached it to do_action like this
do_action( 'myfield', $skillname );
and it worked.
Thanks for your support, 1000 likes to your answer and help 🙂
Thanks @danbp,
Its cool thanks for answer, Will make changes according to me but u made me damn happy. Thanks once again.Thanks @1a-spielwiese too
Thanks @1a-spielwiese,
Is there any way to search users using xprofile fields.
E.g. In my xprofile field i have named “Skills” i want to search all user having the Skill = I.T.
I made Skills as checkbox.Thanks @1a-spielwiese and @danbp,
I created new fields and didn’t updated profile that was the reason of not showing.Is there any way i can access the data in the fields. I created field named Skill i want to access the data in that field and use in other pages/post.
Hello @joeyaberle,
Me too asked that thing couple of days before, one of moderator told it is not possible yet but they gave me link to tutorial where we can make a form to request admin for group creation.
http://bp-tricks.com/coding/manage-group-creation-by-creating-a-group-request-form/
Hi @danbp,
Thanks for response will try that.