Skip to:

Edit fields in members directory

  • andreasnordengen



    Just wondering how I can change the content (age, gender, city) in members vCard on members loop?
    And also translate it into Norwegian.
    Is there an easy way please?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

  • Venutius


    To my knowledge the default bp plugin does not include these fields in the members loop, are these being added by a plugin or did you customise the members loop?



    Well, I asked the developer behind the theme I´m using and got this code:

    function sq7_extra_fields_members_directory() {
        $location = bp_get_member_profile_data('field=Location');
        $specialization = bp_get_member_profile_data('field=Specialization');
        if ($specialization || $location) {
            echo '<div class="mdetcenter">'. 'Location : ' . $location . '</div>';
            echo '<div class="mdetcenter">'. 'Specialization : ' . $specialization . '</div>';
    add_action('bp_directory_members_item', 'sq7_extra_fields_members_directory');

    But, when I add the code and update, I get this message from WordPress:
    Could not communicate back with the site to check for faulty errors, so the PHP change was reset. You must upload your change to the PHP file in another way, for example, with SFTP.

    Could be related to my PHP version…

    It would be better if you added your custom code to bp-custom.php rather than to a theme. (When the theme is updated, you’ll lose your changes.)

    About bp-custom.php:

    To insert those fields, you’ll just have to change you code, replacing 'field=Location' with the name of your profile field. Here’s some more info:

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar