How to limit character length in BuddyPress function output [closed]

I think buddypress has a get* version of that function that returns the value instead of showing it on the screen. So just cut the returned string after a certain amount of characters, like 50: $profile_bio = bp_get_member_profile_data( ‘field=Brief Biography’ ); if(strlen($profile_bio) > 50)) $profile_bio = substr($profile_bio, 0, 50).’…’; echo $profile_bio; If there’s no get … Read more

Remove post content from buddypress activity [closed]

You should state which versions of WP and BP you’re using. This should change the content part of what is recorded. You can put it in your theme’s functions.php add_filter( ‘bp_blogs_activity_new_post_content’, ‘record_post_activity_content’, 1, 3 ); function record_post_activity_content($activity_content, $post, $post_permalink ){ if( $post->post_type == ‘post’ ) { $activity_content=”your custom field”; } return $activity_content; }

BuddyPress – Get a List of Defined xProfile fields [closed]

You can pass the user id in Bp Profile loop to get hold of alll the fields and their values. <?php if ( bp_has_profile(array(‘user_id’ => 1)) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <ul id=”profile-groups”> <?php if ( bp_profile_group_has_fields() ) : ?> <li> <?php bp_the_profile_group_name() ?> <ul id=”profile-group-fields”> <?php while ( bp_profile_fields() ) … Read more