Skip to:
Content
Pages
Categories
Search
Top
Bottom

Check value from bp_member_profile_data

  • Avatar 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)
  • Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    Something like:

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

    @alanniemies

    Thanks a lot, shane!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.