If you mean for authors of the post. Here’s something you can do. Add it in the template where you want it. Remove the parts you don’t want, leave only bp_member_profile_data line. Don’t know how to limit text, easily.
<div class="item-avatar">
<a href=""></a>
</div>
<div class="item">
<div class="item-title">
<a href=""></a>
<span class="update"> - </span>
</div>
<div class="item-meta"><span class="activity"></span></div>
</div>
<div class="action">
</div>
<div class="clear"></div>
Might be a bit more straightforward to do something like this:
displayed_user->id ); echo $bio;
Before echoing the bio, you could try doing something like http://phpsense.com/php/php-word-splitter.html to truncate.
Good luck!
@ nahummadrid This worked for me so thanks, I’m still sorting through it to dig out some stuff I don’t want but it is working and pulling the Bio.
Thank you both of you. Boone I tried your solution and it didn’t work. I’m not sure why. I tried it two ways, using ‘Bio’ and then ’19’ which was the field Id. For some reason it don’t work with my theme. I am looking over the link you gave me thought to see if I can truncate the data.
Thanks
OK, apparently I’m not smart enough to figure out how to truncate it, haha. I didn’t understand the link you gave me at all so I’ve been trying to mess around with a code I found for truncating post titles but I can’t seem to get it to work. Here is what I’m trying to use.
$short_title = bp_member_profile_data('field=Bio','','',false);
$short_title = substr($short_title,0,30);
echo $short_title;
Any help would be appreciated
@gearupandplay To limit the text try this:
for your functions.php :
function Wanna_Limit_Text($Text,$Min,$Max,$MinAddChar) {
if (strlen($Text) < $Min) {
$Limit = $Min-strlen($Text);
$Text .= $MinAddChar;
}
elseif (strlen($Text) >= $Max) {
$words = explode(” “, $Text);
$check=1;
while (strlen($Text) >= $Max) {
$c=count($words)-$check;
$Text=substr($Text,0,(strlen($words[$c])+1)*(-1));
$check++;
}
}
return $Text;
}
this for you template :
post_author )),10,90""); ?>
Where 90 is the number of characters and you just adjust that.
Good luck
@nahummadrid thanks much, worked like a charm