the_archive_title() WordPress Function

The the_archive_title() function displays the title of the current archive.

the_archive_title( string $before = '', string $after = '' ) #

Display the archive title based on the queried object.


Description

Top ↑

See also


Top ↑

Parameters

$before

(string)(Optional) Content to prepend to the title.

Default value: ''

$after

(string)(Optional) Content to append to the title.

Default value: ''


Top ↑

Source

File: wp-includes/general-template.php

function the_archive_title( $before = '', $after = '' ) {
	$title = get_the_archive_title();

	if ( ! empty( $title ) ) {
		echo $before . $title . $after;
	}
}


Top ↑

Changelog

Changelog
VersionDescription
4.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More