bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

How to have topic_author() show "display_name"?

(2 posts)
  • Started 1 year ago by intellivision
  • Latest reply from _ck_
  • This topic is not resolved
  1. 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 1 year ago #
  2. 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.

    Posted 8 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.