Get question author username
Try this:
$question = get_post($question_id); get_the_author_meta( 'user_login', $question->post_author );
Read more info here: get_the_author_meta


Zoker (Buyer) commented
A just used global $question_id 🙂
Try this:
$question = get_post($question_id); get_the_author_meta( 'user_login', $question->post_author );
Read more info here: get_the_author_meta
A just used global $question_id 🙂
But question_id is a undefined var.