Title: the_author_meta
Published: April 25, 2014
Last modified: August 20, 2026

---

# the_author_meta( string $field = '', int|false $user_id = false )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#parameters)
 * [More Information](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#wp--skip-link--target)

Outputs the field from the user’s DB object. Defaults to current post’s author.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#see-also)󠁿

 * [get_the_author_meta()](https://developer.wordpress.org/reference/functions/get_the_author_meta/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#parameters)󠁿

 `$field`stringoptional

Selects the field of the users record. See [get_the_author_meta()](https://developer.wordpress.org/reference/functions/get_the_author_meta/)
for the list of possible fields.

More Arguments from get_the_author_meta( … $field )

The user field to retrieve.

Default:`''`

`$user_id`int|falseoptional

User ID. Defaults to the current post author.

Default:`false`

## 󠀁[More Information](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#more-information)󠁿

This template tag displays a desired meta data field for a user. Only one field 
is returned at a time, you need to specify which you want.

If this tag is used within The Loop, the user ID value need not be specified, and
the displayed data is that of the current post author. A user ID can be specified
if this tag is used outside The Loop.

If the meta field does not exist, nothing is printed.

**NOTE:** Use `get_the_author_meta()` if you need to return (and do something with)
the field, rather than just display it.

For parameter $userID, if the user ID fields is used, then this function display
the specific field for this user ID.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#source)󠁿

    ```php
    function the_author_meta( $field = '', $user_id = false ) {
    	$author_meta = get_the_author_meta( $field, $user_id );

    	/**
    	 * Filters the value of the requested user metadata.
    	 *
    	 * The filter name is dynamic and depends on the $field parameter of the function.
    	 *
    	 * @since 2.8.0
    	 *
    	 * @param string    $author_meta The value of the metadata.
    	 * @param int|false $user_id     The user ID.
    	 */
    	echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/author-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/author-template.php#L209)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/author-template.php#L209-L223)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#hooks)󠁿

 [apply_filters( “the_author_{$field}”, string $author_meta, int|false $user_id )](https://developer.wordpress.org/reference/hooks/the_author_field/)

Filters the value of the requested user metadata.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#related)󠁿

| Uses | Description | 
| [get_the_author_meta()](https://developer.wordpress.org/reference/functions/get_the_author_meta/)`wp-includes/author-template.php` |

Retrieves the requested data of the author of the current post.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [the_author_icq()](https://developer.wordpress.org/reference/functions/the_author_icq/)`wp-includes/deprecated.php` |

Display the ICQ number of the author of the current post.

  | 
| [the_author_yim()](https://developer.wordpress.org/reference/functions/the_author_yim/)`wp-includes/deprecated.php` |

Display the Yahoo! IM name of the author of the current post.

  | 
| [the_author_msn()](https://developer.wordpress.org/reference/functions/the_author_msn/)`wp-includes/deprecated.php` |

Display the MSN address of the author of the current post.

  | 
| [the_author_aim()](https://developer.wordpress.org/reference/functions/the_author_aim/)`wp-includes/deprecated.php` |

Display the AIM address of the author of the current post.

  | 
| [the_author_url()](https://developer.wordpress.org/reference/functions/the_author_url/)`wp-includes/deprecated.php` |

Display the URL to the home page of the author of the current post.

  | 
| [the_author_ID()](https://developer.wordpress.org/reference/functions/the_author_id/)`wp-includes/deprecated.php` |

Display the ID of the author of the current post.

  | 
| [the_author_description()](https://developer.wordpress.org/reference/functions/the_author_description/)`wp-includes/deprecated.php` |

Display the description of the author of the current post.

  | 
| [the_author_login()](https://developer.wordpress.org/reference/functions/the_author_login/)`wp-includes/deprecated.php` |

Display the login name of the author of the current post.

  | 
| [the_author_firstname()](https://developer.wordpress.org/reference/functions/the_author_firstname/)`wp-includes/deprecated.php` |

Display the first name of the author of the current post.

  | 
| [the_author_lastname()](https://developer.wordpress.org/reference/functions/the_author_lastname/)`wp-includes/deprecated.php` |

Display the last name of the author of the current post.

  | 
| [the_author_nickname()](https://developer.wordpress.org/reference/functions/the_author_nickname/)`wp-includes/deprecated.php` |

Display the nickname of the author of the current post.

  | 
| [the_author_email()](https://developer.wordpress.org/reference/functions/the_author_email/)`wp-includes/deprecated.php` |

Display the email of the author of the current post.

  |

[Show 7 more](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 4 content](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#comment-content-798)
 2.    [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_author_meta/#comment-798)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-798)
     Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-798)
 4.  **Display a User Email Address**
      Displays the email address for user ID 25.
 5.      ```php
         <p><?php printf( __( 'The email address for user id 25 is %s', 'textdomain' ), get_the_author_meta( 'user_email',25 ) ); ?></p>
         ```
     
 6.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%3Freplytocom%3D798%23feedback-editor-798)
 7.   [Skip to note 5 content](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#comment-content-799)
 8.    [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_author_meta/#comment-799)
 9.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-799)
     Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-799)
 10. **Advanced Uses**
      A plugin may add an additional field in the registration or
     manage users, which adds a new value in the `wp_usermeta` (where `wp_` is your
     data base prefix. For this example we will use a Twitter ID if a plugin set meta_key
     value to “twitter” and meta_value to “wordpress” then
 11.     ```php
         <p><?php printf( __( 'This author’s Twitter name is %s', 'textdomain' ), get_the_author_meta( 'twitter' ) ); ?></p>
         ```
     
 12. would return:
 13. This author’s Twitter name is WordPress
 14.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%3Freplytocom%3D799%23feedback-editor-799)
 15.  [Skip to note 6 content](https://developer.wordpress.org/reference/functions/the_author_meta/?output_format=md#comment-content-1563)
 16.   [Peter Ph](https://profiles.wordpress.org/pphoen1x/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_author_meta/#comment-1563)
 17. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-1563)
     Vote results for this note: -4[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%23comment-1563)
 18. And if you actually want to show the Author description using this function you
     can just do:
 19.     ```php
         <?php $authorDesc = the_author_meta('description'); echo $authorDesc; ?>
         ```
     
 20.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F%3Freplytocom%3D1563%23feedback-editor-1563)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_author_meta%2F)
before being able to contribute a note or feedback.