Re: Using bp_blogs_get_latest_posts() Returns An Error
I’ve been working on this project off and on, but after coming back to this particular issue and still not seeing a straightforward solution, I decided to just use the PHP explode function. Obviously not completely ideal, but until I find an alternative, in this case, it should do. Here’s what I used in case anyone else would like to know:
<?php
$activityText = bp_get_activity_action();
$activityTextNew = explode("post: ", $activityText);
$activityPostTitle = explode('<span class="time-since">', $activityTextNew[1]);
?>
Then you use the value of $activityPostTitle[0] for the title of the post:
<?php
echo $activityPostTitle[0];
?>
Obviously this is dependent on the default text for bp_get_activity_action.