Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Data On A Member Directory


  • psfk
    Participant

    @psfk

    I am still having trouble getting profile data to list by each member listing on the Directory page.

    I want to hack the members-loop.php with this code but it returns a number not the data itself.

    <?php echo xprofile_get_field_data( 'One Line Summary', bp_the_site_member_user_id() ); ?>

    The number differs per profile so I think it\’s looking in the right place just returning a row number maybe not the value.

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

  • psfk
    Participant

    @psfk

    Any thoughts, guys?


    Andy Peatling
    Keymaster

    @apeatling

    Get the latest trunk version and do this:

    <?php echo xprofile_get_field_data( \'One Line Summary\', bp_get_the_site_member_user_id() ); ?>


    Treblamah
    Participant

    @treblamah

    What about formatting the data that comes out of this? I get the text from the field, but it’s full of slashes.


    landykos
    Participant

    @landykos

    I just did a query on the members table then did a for each on the results. and for each group run the buddypress function:

    global $wpdb;

    $groups = $wpdb->get_results(“SELECT * FROM wp_bp_groups order by name”, ARRAY_A);

    foreach ($groups as $group) :

    bp_group_has_members(‘group_id=’.$group[‘id’].’&exclude_admins_mods=false’)

    Then $group[‘name’] will get you the members name.

    Hope that helps you!

    LK


    Treblamah
    Participant

    @treblamah

    Thanks. I ended up just switching the Group ID on the field I wanted to separate and called that profile group where I wanted the field to appear. I reproduced the profile loop in the index.php file for the user profile twice, once calling group 1 and the other, group 3.

    <?php if ( bp_has_profile('profile_group_id=3') ) : ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Profile Data On A Member Directory’ is closed to new replies.
Skip to toolbar