Info
- 2 posts
- 2 voices
- Started 4 years ago by intellivision
- Latest reply from _ck_
- This topic is not resolved
How to have topic_author() show "display_name"?
-
- Posted 4 years ago #
On front-page.php I'd like the "first poster" column to show the users' display_name (bbPress is synced with WP).
I've tried this
<td class="num"><?php echo(get_author_name(topic_author())); ?></td>which calls this
function get_author_name( $auth_id ) { $authordata = get_userdata( $auth_id ); return $authordata->display_name; }but it still shows "user_login" which tend to have ugly underscores etc.
-
- Posted 4 years ago #
You can use str_replace in php to get rid of the underscores or probably find the nicename function in wordpress and filter through that.
-
You must log in to post.