-1

On the Post edit page in the back-end, how do I echo the author's user_nicename? I am referring to the author of the post, not current user.

  • Can you edit the solution out and put it in an answer? – Tom J Nowell May 16 '13 at 15:30
2

Found it:

global $post;
$author_id=$post->post_author;
the_author_meta('user_nicename', $author_id );
0

Came across this because I needed to do this, I would advise against accessing the global like this I used this.

get_the_author_meta( 'user_nicename', get_the_author_meta( 'ID' ) )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.