WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/the author

Contents

Description

The author of a post can be displayed by using this Template Tag. This tag must be used within The Loop.

To return to PHP rather than displaying, use get_the_author().

Usage

 <?php the_author(); ?> 

Examples

Display Author's 'Public' Name

Displays the value in the user's Display name publicly as field.

<p>This post was written by <?php the_author(); ?></p>

Parameters

$post-id (integer).

Related

the_author(), get_the_author(), the_author_link(), get_the_author_link(), the_author_meta(), get_the_author_meta(), the_author_posts(), get_the_author_posts(), the_author_posts_link(), get_author_posts_url(), get_the_modified_author(), the_modified_author(), wp_dropdown_users(), wp_list_authors()

See also index of Function Reference and index of Template Tags.