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

If I wanted to get a custom field of the current user I would use something like this.

<?php echo get_user_meta($user_info->ID,'address_line_2',true);?>

This time however I want the author so I tried multiple version of the following to no avail.

$thisauthorID = get_the_author_ID();

echo get_the_author_meta($thisauthorID,'address',true)

Any ideas?


share|improve this question
up vote 2 down vote accepted

get_the_author_meta() != get_user_meta().
Change to:
echo get_the_author_meta('address', $thisauthorID);

share|improve this answer
Quite right, just got it myself. Thanks, – Robin I Knight Feb 22 '11 at 17:10
humm - not sure i get the difference. get_the_author_meta() defaults to the current user, unless the second parameter is defined. Where as get_user_meta(id) means the user id must be passed in. Is that the main difference? – emeraldjava Sep 6 '12 at 16:38

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.