How to get custom text before xprofile field output
It’s be great if someone can suggest me how to get custom text before outputting the xprofile field contents. For eg., I’d want to output like “Lives in ($Loction)”, “Studied at ($school)” etc.. How do I output those custom text as “Lives in” “studied at” before the actual content output of fields. The reason being I’m using this on the sidebar widget.. Though I tried with something like:
<?php echo ‘Lives in’, xprofile_get_field_data( ‘Location’, bp_displayed_user_id(), $multi_format = ‘comma’ ) ?>
It outputs the “Lives in” custom text irrespective of whether the field is empty or filled.. I want to show both custom text and field content only when the field is filled..
- You must be logged in to reply to this topic.