the_archive_title
Display the archive title based on the queried object.
Description
Parameters (2)
- 0. $before — Optional. (string) =>
''
- Content to prepend to the title. Default empty.
- 1. $after — Optional. (string) =>
''
- Content to append to the title. Default empty.
Usage
if ( !function_exists( 'the_archive_title' ) ) { require_once ABSPATH . WPINC . '/general-template.php'; } // Optional. Content to prepend to the title. Default empty. $before = ''; // Optional. Content to append to the title. Default empty. $after = ''; // NOTICE! Understand what this does before running. $result = the_archive_title($before, $after);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/general-template.php
- function the_archive_title( $before = '', $after = '' ) {
- $title = get_the_archive_title();
- if ( ! empty( $title ) ) {
- echo $before . $title . $after;
- }
- }