WPDev.one
Core Function
View Source on Trac ↗

get_the_author_meta()

get_the_author_meta( mixed $field = '', mixed $user_id = false )

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

Parameters 1 required

Name / Type Description
$field
string

Optional. The user field to retrieve. Default empty.

(int

| false) $user_id Optional. User ID. Defaults to the current post author.

Required

Return Value

(string)
The author's field from the current author's DB object, otherwise an empty string.

Function Information

Since Version
2.8.0
Source File
wp-includes/author-template.php
Advertisement