Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Output "Not Provided" if bp_member_profile_data is empty or null


  • jaybee08
    Participant

    @jaybee08

    Hello buddypress users,

    I am trying to achieve to display “Not Provided” if user has not fill out a certain xprofile field. Below is the code I’ve used but seems doesn’t work:

    <?php $hair = bp_member_profile_data( ‘field=Hair’ ); if($hair == null ) { echo $not_provided; } else { echo $hair; } ?>

    example:

    Hair: Not provided
    eyes: blue
    earings: Not Provided

    Any help from you guys would be greatly appreciated.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Output "Not Provided" if bp_member_profile_data is empty or null’ is closed to new replies.
Skip to toolbar