document_title_parts filter-hookWP 4.4.0

Filters the parts of the document title.


add_filter( 'document_title_parts', 'wp_kama_document_title_parts_filter' );

 * Function for `document_title_parts` filter-hook.
 * @param array $title The document title parts.
 * @return array
function wp_kama_document_title_parts_filter( $title ){

	// filter...
	return $title;

The document title parts.

  • title(string)
    Title of the viewed page.

  • page(string)
    Optional. Page number if paginated.

  • tagline(string)
    Optional. Site description when on home page.

  • site(string)
    Optional. Site title when not on home page.


Since 4.4.0 Introduced.

Where the hook is called

wp-includes/general-template.php 1273
$title = apply_filters( 'document_title_parts', $title );

Where the hook is used in WordPress

Usage not found.