Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to pull a profile field?


  • enderpal444
    Participant

    @enderpal444

    I want to allow my authors to add their social media links (twitter,facebook) to their profile and then I want to be able to call those links in things like their posts. I know how to add new fields to the profiles but how can I call them?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @enderpal444:
    $data = bp_get_profile_field_data( ‘field=Country’ ) ;
    echo “Country:”. $data;


    enderpal444
    Participant

    @enderpal444

    I’m getting an error when I tried to add this saying unexpected ‘=’. Here’s what I added to my template.

    ………
    *?pHp
    $data = bp_get_profile_field_data( ‘field=Twitter URL’ ) ;
    echo $data;
    ?*
    ……..


    enderpal444
    Participant

    @enderpal444

    I tired making it $data = bp_get_profile_field_data( ‘Twitter URL’ );
    but that returned unexpected T String.

    Also do I need to add anything like $user_id to make it work outside the loop on single post page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to pull a profile field?’ is closed to new replies.
Skip to toolbar