title: WordPress: get author info from post id
body: <p>Or even the author id from the post id. I am trying to return the author meta (author page link and avatar) in the sidebar of a single post page (outside of the post loop). What is the best way to do this? I am using a custom function (see below) to return the post id, but am not sure what function to call next.</p>
  
  <pre><code>function this_post_id() {
    global $wp_query;
    $thePostID = $wp_query-&gt;post-&gt;ID;
    return $thePostID;
  }
  </code></pre>