Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display an excerpt from xprofile field


  • Kim Blake
    Participant

    @kespinoza

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display an excerpt from xprofile field’ is closed to new replies.
Skip to toolbar