W3cubDocs

/WordPress

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

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

Description

See also

Parameters

$field

(string) (Optional) Selects the field of the users record. See get_the_author_meta() for the list of possible fields.

Default value: ''

$user_id

(int|false) (Optional) User ID.

Default value: false

Source

File: wp-includes/author-template.php

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

	/**
	 * 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 );
}

Changelog

Version Description
2.8.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_author_meta