Skip to:
Content
Pages
Categories
Search
Top
Bottom

Check value from bp_member_profile_data

  • Profile photo of Alan Niemies
    Alan Niemies
    Participant

    @alanniemies

    Hello!

    I’m developing a medical online community based on BuddyPress and I’d like to know how to check the value from a specific bp_member_profile_data field. If the user put a specific value (this field is a Dropdown with several choices), such as a Physician or a Student, I’ll like to display a specific button on the user’s profile.

    Does anyone have an idea on how to accomplish this?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Something like:

    $field_check = xprofile_get_field_data( 'the field name', bp_displayed_user_id() );
    
    if ( 'Physician' == $field_check ) 
        // show a button
    Profile photo of Alan Niemies
    Alan Niemies
    Participant

    @alanniemies

    Thanks a lot, shane!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Check value from bp_member_profile_data’ is closed to new replies.
Skip to toolbar