BuddyDev

Search

[Resolved] Distance of members

Tagged: ,

  • Participant
    Level: Enlightened
    Posts: 53
    Jennifer on #26439

    Do you know a way to see of the member page by distance without use a filter like something the code below? I have activated the field with google api.

    <?php if ( bp_has_members() ) : ?>
    <?php while ( bp_members() ) : bp_the_member(); ?>

    $some_field = xprofile_get_field_data( ‘Some Field’, bp_get_member_user_id() );

    thanks very much!
    regards,
    Jennifer

  • Keymaster
    (BuddyDev Team)
    Posts: 24092
    Brajesh Singh on #26442

    Hi Jennifer,
    I am sorry but I am unable to understand the question.

    Please help me understand it better.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 53
    Jennifer on #26449

    Sure I am making a web that a person answer questions and with his answer he automatically registers.
    Then I redirect it to show the closest members that appear geographically and similar xprofile It would be like a suggestion of friendship by location and xprofile.

    i hope you can understand me.
    Thanks!!

  • Keymaster
    (BuddyDev Team)
    Posts: 24092
    Brajesh Singh on #26460

    Hi Jennifer ,
    I am sorry, there are no direct ways to do it.

    you will most probably need a plugin that captures geo location for each user and then use distance search based on current’s user’s location.

    I do not see a direct way available.

    There are plugins for xprofile location, but they will not capture it automatically, A user will need to specify it.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 53
    Jennifer on #26490

    Thank you very much Brajesh I am close to being able to do it.
    If I succeed, i post it here. Regards!

  • Keymaster
    (BuddyDev Team)
    Posts: 24092
    Brajesh Singh on #26507

    Thank you. I am looking forward to it.

    All the best.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 53
    Jennifer on #26634

    Hi i used the plugin bp-search with this code:

    https://wordpress.org/support/topic/autocomplete-the-location/
    Regards!

  • Keymaster
    (BuddyDev Team)
    Posts: 24092
    Brajesh Singh on #26655

    Hi Jennifer,
    Thank you for sharing. That’s good to know.

    Regards
    Brajesh

The topic ‘ [Resolved] Distance of members’ is closed to new replies.

This topic is: resolved