All the information about author of the post being displayed or current post in the Wordpress loop is stored in this global variable. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php. setup_postdata($post) is invoked in the Wordpress loop on the current post.
Wordpress provides a set of functions to retrieve the author information. This global variable need not be directly accessed by the plugin or theme developers.
In the list below, all the get_the_author_* functions have the_author_* counterparts. The get_the_author_* functions return the value whereas the_author_* functions display (echo) it.
The functions are:
get_the_author()returns the author’s display name.get_the_author_description()returns the author’s profile.get_the_author_login()returns the author’s username.get_the_author_firstname()returns the author’s first name.get_the_author_lastname()returns the author’s last name.get_the_author_nickname()returns the author’s nickname.get_the_author_ID()returns the author’s login ID.get_the_author_email()returns the author’s email address.get_the_author_url()returns URL of the author’s website.get_the_author_icq()returns the author’s ICQ ID.get_the_author_aim()returns the author’s AIM ID.get_the_author_yim()returns the author’s Yahoo! Messenger ID.get_the_author_msn()returns the author’s MSN Messenger ID.get_the_author_posts()returns the author’s posts.the_author_posts_link()displays link to all posts by the author.
In addition to this there are some more functions that can be used to retrieve details of specified author, they work even outside the Wordpress loop.
get_author_link($echo = false, $author_id, $author_nicename)return link to all posts by the author.wp_list_authors($args = '')lists links to all the authors, every link leading to all posts by an author. The arguments it takes areoption_count: true/falseexclude_admin: true/falseshow_fullname: true/falsehide_empty: true/falsefeed: feed namefeed_image: path to feed image
Back to full list of global variables.
Technorati tags: authordata, wordpress+author, author posts, author profile, author name


April 17th, 2006 at 10:25 am
[...] $authordata [...]
August 7th, 2007 at 9:47 am
Welcome!!! fff anal
October 23rd, 2007 at 8:13 pm
[...] $authordata [...]