Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
532 views
in Plugins by
edited by
1.

On the question list page,I can see many questions,with their create user name.I find that it comes from function post_meta_who($post, $class) in qa-theme-base.php.

I just want to create a new theme, which will use the "user name". How can I get it? I have tried  $post['who']['data'] , but it seems like a html string, not a name. If I use  $userid of each post to help me get $handle, next question comes.

2.

The other question, in the index page,it will show recent questions and answers.So I find that the user name followed each question isn't the author of the question,but the author of the question or the answer.So maybe I can't use $userid of each post  on the recent Q&A list page to get the user name.

 

Actually, all I want is to know how $post['who']['data'] can get the user name.Then I can do it by the same way.Someone can help me?

Thanks.
Q2A version: 1.5.2

1 Answer

0 votes
by
selected by
 
Best answer
Check out $post['raw'] within your theme function - it contains all the information retrieved from the database including the raw username.
...