Skip to:
Content
Pages
Categories
Search
Top
Bottom

User ID in Members Loop

  • @johnkim1968

    Participant

    Hello,

    I’m using the code below to list members xprofile fields in the member directory successfully. However,I would like to replace the City with the User ID in the Members Loop. I’m pretty sure I need to insert “<?php echo bp_member_user_id(); ?>” How would I do that? Anyone have an idea?

    //Members Directory Page Meta Fields
    add_action(‘after_setup_theme’,’kleo_my_member_data’);
    function kleo_my_member_data()
    {
    global $kleo_config;
    //this is the details field, right now it take the “About me” field content
    $kleo_config[‘bp_members_details_field’] = ‘About me’;
    //this display the fields under the name, eq: 36 / Woman / Divorced / Berlin. Modify with the names of the fields you want to appear there
    $kleo_config[‘bp_members_loop_meta’] = array(
    ‘Height’,
    ‘City’,
    );

    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • @henrywright

    Moderator

    echo bp_member_user_id(); will output an integer (user ID) like this 38. Is that what you want to happen?

    @johnkim1968

    Participant

    Hello Henry,

    Thanks for your reply. I’d like it to output “35 , 170 cm., ID#22” Can you point me in the right direction? Thanks so much.

    @henrywright

    Moderator

    echo bp_member_user_id(); will output the user ID. How are you outputting the 35, 170 cm part?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User ID in Members Loop’ is closed to new replies.
Skip to toolbar