Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to get xprofile data to show up on child blogs (e.g. Author name and bio)


rsqst
Participant

@rsqst

Ok, I think I’m close to knowing what I want; But I don’t seem to be much closer to getting there.

Unfortunately, I think my main problem is that the members loop isn’t flexible enough in its parameters for what I want (I want to add it to a child template and for it to automatically show the users of the current blog AND their xprofile information. Seems simple, but I’m lost).

I could hand code in each of users ID’s and get the exact output I want, but this means I have to make a new template for each blog/”art project”, and it doesn’t update automatically when a new artist is added to a project.

There’s hope in the group members loop (I’m using the BP Groupblog plugin, so when users join a group, they are added to a blog), but I still have to enter in the group_id manually in the template.

<?php if ( bp_group_has_members('group_id=1') ) : ?>

<?php while ( bp_group_members() ) : bp_group_the_member(); ?>

<?php $authorBio = xprofile_get_field_data( 'Bio', $user_id=bp_group_member_id() );

echo 'Authors bio: '. $authorBio; ?>

<?php endwhile; ?>

<?php endif;?>

But as it is, it outputs: 11Authors bio: 10Authors bio: 9Authors bio: 8Authors bio: 7Authors bio: 5Authors bio:

Should I scratch the whole thing and find a new route?

Skip to toolbar