get_the_archive_description

Advertisement

Summery Summery

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

Syntax Syntax

get_the_archive_description()

Return Return

(string) Archive description.

Source Source

File: wp-includes/general-template.php

 * @since 5.5.0 The title part is wrapped in a `<span>` element.
 *
 * @return string Archive title.
 */
function get_the_archive_title() {
	$title  = __( 'Archives' );
	$prefix = '';

	if ( is_category() ) {
		$title  = single_cat_title( '', false );
		$prefix = _x( 'Category:', 'category archive title prefix' );
	} elseif ( is_tag() ) {
		$title  = single_tag_title( '', false );
		$prefix = _x( 'Tag:', 'tag archive title prefix' );
	} elseif ( is_author() ) {
		$title  = get_the_author();
		$prefix = _x( 'Author:', 'author archive title prefix' );
	} elseif ( is_year() ) {

Advertisement

Changelog Changelog

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

See also See also

Advertisement

Leave a Reply