W3cubDocs

/WordPress

get_the_archive_description()

Retrieves the description for an author, post type, or term archive.

Description

See also

Return

(string) Archive description.

Source

File: wp-includes/general-template.php

function get_the_archive_description() {
	if ( is_author() ) {
		$description = get_the_author_meta( 'description' );
	} elseif ( is_post_type_archive() ) {
		$description = get_the_post_type_description();
	} else {
		$description = term_description();
	}

	/**
	 * Filters the archive description.
	 *
	 * @since 4.1.0
	 *
	 * @param string $description Archive description to be displayed.
	 */
	return apply_filters( 'get_the_archive_description', $description );
}

Changelog

Version Description
4.9.0 Added support for post type archives.
4.7.0 Added support for author archives.
4.1.0 Introduced.

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