Display an excerpt from xprofile field
I am using this code to display an excerpt from an extended profile field.
<?php $profile_story = bp_profile_field_data( 'field=3&user_id=' . bp_get_member_user_id() ); if(strlen($profile_story) > 50) $profile_story = substr($profile_story, 0, 50); ?> <p><?php echo $profile_story; ?></p>
I have it in the members-loop and I keep getting the full content, instead of just an excerpt. What am I doing wrong?
- The topic ‘Display an excerpt from xprofile field’ is closed to new replies.