• Resolved Carsten Lund

    (@carsten-lund)


    Hi there, I’m using this code snippet to remove the actual position of profiles in Members Directory for the sake of privacy rules. But it would be nice to be able to display the distance instead, is it possible to change the code to display distance instead in km?

    add_filter (‘bps_details’, ‘change_details’);
    function change_details ($details)
    {
    unset ($details[‘field_3488’]); // don’t show field_3488
    return $details;
    }

    Regards

    Carsten

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    Instead of using that code snippet, I suggest you customize the bps_details template, located in:

    wp-content\plugins\bp-profile-search\templates\members\bps-details.php

    Go to the ‘distance’ case, and customize the printf statement(s).

    Follow the instructions in the file header comments in order to properly override this template.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, thanks for the tip, I will look into that.

    Regards

    Carsten

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi there, I have tried to remove the $label, $value, leaving the $distance, but then the search cycles endlessly without coming up with a search result.

    These are the only options I see here?

    Regards

    Carsten

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    Try using this printf statement:

    printf (__('distance %d km', 'bp-profile-search'), $distance);
    
    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, thank you very much for your help, it’s working very well.

    Regards

    Carsten

    Plugin Author Andrea Tarantini

    (@dontdream)

    You’re very welcome!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display distance instead of address’ is closed to new replies.