Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to get topic starter’s username?


r-a-y
Keymaster

@r-a-y

It’s better to be clear when posting!

You can use this snippet in your theme’s functions.php:

`function ray_bp_get_the_topic_last_poster_name( $name ) {
global $forum_template;

return str_replace($forum_template->topic->topic_last_poster_displayname, $forum_template->topic->topic_last_poster_login, $name);
}
add_filter( ‘bp_get_the_topic_last_poster_name’, ‘ray_bp_get_the_topic_last_poster_name’ );`

This snippet is part of my BuddyPress Usernames Only plugin, which you might be interested in:
https://wordpress.org/extend/plugins/buddypress-usernames-only/

Skip to toolbar