A WordPress-centric search engine for devs and theme authors



the_archive_title ›

Since4.1.0
Deprecatedn/a
the_archive_title ( $before = '', $after = '' )
Parameters: (2)
  • (string) $before Optional. Content to prepend to the title. Default empty.
    Required: No
    Default: (empty)
  • (string) $after Optional. Content to append to the title. Default empty.
    Required: No
    Default: (empty)
See:
Defined at:
Codex:

Display the archive title based on the queried object.



Source

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

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