WordPress: get author info from 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.
function this_post_id() { global $wp_query; $thePostID = $wp_query->post->ID; return $thePostID; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WordPress: get author info from post id’ is closed to new replies.