WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

hi and thanks for reading i try to grab the authors slug in the backend.

get_the_author_meta( 'user_nicename' );

is empty. i tried to google this issue, but cant find any concrete info on how to handle the backend. any hints would be nice. i keep writing to meet the quality standards. sorry for spaming but this seems to be the only solution. call it spam, i call it anyoing, but i wont complain, cause otherwise, what stupid text would end up here, just to get a little help.

share|improve this question

Please read the codex on this function. Outside of the loop, your second arg must be a user ID. Inside the loop, WP grabs it from the post data.

get_the_author_meta('user_nicename', $userID);
share|improve this answer
ok. got it, thank you. was confused cause it worked in some other place (well, in the loop). – honk31 Dec 11 '11 at 12:46

to get, what i wanted, not just in the loop, but also in the backend, i wrote

function my_function( $id = 0 ) {
    $post = &get_post($id);
    $author = get_userdata($post->post_author);
    $user_url = $author->user_nicename;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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