WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/get the author

Contents

Description

Retrieve the post author. This tag must be used within The Loop.

To display a page for authors which have no posts, see this discussion.

Usage

 <?php $author get_the_author(); ?> 

Parameters

$deprecated
(string) (optional) Deprecated.
Default: ''

Returns

(string) 
The author's display name.

Examples

Grab the Author's 'Public' Name

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

<?php $author = get_the_author(); ?>

Change Log

Since: 1.5.0

Source File

get_the_author() is located in wp-includes/author-template.php.

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.