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

Displays the archive title based on the queried object.

Description

See also

Parameters

$beforestringoptional
Content to prepend to the title.

Default:''

$afterstringoptional
Content to append to the title.

Default:''

Source

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

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

Changelog

VersionDescription
4.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.