WordPress at a glance

the_archive_title() WP 1.0

Display the archive title based on the queried object.

Works based on: get_the_archive_title()

No Hooks.

Return

Null. Nothing.

Usage

the_archive_title( $before, $after );
$before(string)
Content to prepend to the title.
Default: ''
$after(string)
Content to append to the title.
Default: ''

Notes

  • See: get_the_archive_title()

Changelog

Since 4.1.0 Introduced.

Code of the archive title: wp-includes/general-template.php WP 5.2.4

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

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

Related Functions

From tag: Archives (of posts)

More from tag: title (of post page)

More from category: Archives

More from Template Tags: Main Functions

No comments
    Hello, !     Log In . Register