wpseek.com
A WordPress-centric search engine for devs and theme authors



the_archive_title › WordPress Function

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:

Displays 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;
	}
}