Codex tools: Log in
Languages: English • 日本語 • (Add your language)
Contents |
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.
<?php the_author(); ?>
Displays the value in the user's Display name publicly as field.
<p>This post was written by <?php the_author(); ?></p>
$post-id (integer).
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()