Re: bp_the_topic_last_poster_name() not working?
That function name is a little misleading, as bp_the_topic_last_poster_name() only works within the forum loop on the forum directory.
You’ll have to write your own function to grab the last poster name in the topic loop try something like this in your theme’s functions.php:
`
function my_the_topic_last_poster_name() {
echo my_get_the_topic_last_poster_name();
}
function my_get_the_topic_last_poster_name() {
global $forum_template;
if ( !$domain = bp_core_get_user_domain( $forum_template->topic->topic_last_poster ) )
return __( ‘Deleted User’, ‘buddypress’ );
return apply_filters( ‘my_get_the_topic_last_poster_name’, ‘‘ . $forum_template->topic->topic_last_poster_name . ‘‘ );
}
`
Then in your topic.php, add the following:
`
`