Languages: English • Italiano • 日本語 (Add your language)
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().
Attention: unike other template tags like the_title(), the_author() not only displays but also returns the value, so be sure to use <?php the_author() ?> but not <?= the_author() ?> to avoid double output.
<?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(), get_the_author_id(), 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()