Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show xprofile data?

  • @peterverkooijen

    Participant

    Another dumb question: How can I show xprofile data on the profile pages?

    For example, I have a field called ‘introduction’ (field_4). How can I show the contents under profile-name and avatar?

    Must have been asked before, but this was the only thread I could find about it.

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

    Participant

    This should help:

    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-profile-data-loop-bp_has_profile/

    I had to separate the fields by group to pull only one field at a time that preserved the formatting. The other ways I found to pull individual field data produced text without line breaks.

    @peterverkooijen

    Participant

    Thanks Treblamah!

    Wow, that is horribly unusable again… :-(

    This spits out all the xprofile data:

    <?php bp_get_profile_header() ?>
    <?php bp_the_avatar() ?>
    <?php if ( function_exists('xprofile_get_profile') ) : ?>
    <?php xprofile_get_profile() ?>
    <?php else : ?>
    <?php bp_core_get_wp_profile() ?>
    <?php endif; ?>

    And I guess I have to add parameters to make it more selective. Or copy that xprofile_get_profile function and customize it.

    I’ll look into that later…

    @treblamah

    Participant

    Yeah, it took me a while to get it the way I wanted it on my site too. Good luck.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show xprofile data?’ is closed to new replies.
Skip to toolbar