Displays the archive title based on the queried object.
Description
See also
Parameters
$before
stringoptional- Content to prepend to the title.
Default:
''
$after
stringoptional- 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
Version | Description |
---|---|
4.1.0 | Introduced. |
Display archive title.
See Also
the_archive_description() – Display category, tag, term, or author description
Used for returning/displaying the title of the current term, date, post type, post format, or author archive.