Skip to:
Content
Pages
Categories
Search
Top
Bottom

Getting xprofile_get_field_data in blog comments?

  • Profile photo of smuda
    smuda
    Participant

    @smuda

    hey there,

    i currently use the following code to display a special field from a users profile within buddypress:

    <?php echo xprofile_get_field_data('7'); ?>

    i now want to use that same data right beside a users name, if he comments on a blogpost.

    i’m using the latest buddypress and wpmu.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Profile photo of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    You’ll need to feed the user_id of the user to the function. I think something like this will work:

    <?php echo xprofile_get_field_data( '7', $comment->user_id ); ?>

    Profile photo of smuda
    smuda
    Participant

    @smuda

    @Boone Gorges awesome!

    thank you very much, works great :D

    Profile photo of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Cool!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting xprofile_get_field_data in blog comments?’ is closed to new replies.