Skip to:
Content
Pages
Categories
Search
Top
Bottom

Getting custom profile field information in header

  • @kyleid

    Participant

    Hi I have created some custom profile fields in BP, which I am trying to grab with PHP to send to Mixpanel in the ‘header.php’ (default theme) I have tried the bp_member_profile_data(‘field=SiteName’); but it looks like I’m calling it to early as it is completely empty. Do I have to declare something before this, am I even on the right track?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @karmatosed

    Moderator

    You need to somehow pass it the userid. Something possibly like this could work (it’s untested):

    `
    $userid = bp_core_get_userid( $username );
    bp_profile_field_data( array(‘user_id’=>$userid,’field’=>’fieldname’ ));
    `

    @nadegda881

    Participant

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting custom profile field information in header’ is closed to new replies.
Skip to toolbar