Title: document_title
Published: July 20, 2021
Last modified: February 24, 2026

---

# apply_filters( ‘document_title’, string $title )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#wp--skip-link--target)

Filters the document title.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#parameters)󠁿

 `$title`string

Document title.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#source)󠁿

    ```php
    $title = apply_filters( 'document_title', $title );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/general-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/general-template.php#L1294)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/general-template.php#L1294-L1294)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_get_document_title()](https://developer.wordpress.org/reference/functions/wp_get_document_title/)`wp-includes/general-template.php` |

Returns document title for the current page.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/document_title/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.8.0](https://developer.wordpress.org/reference/since/5.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdocument_title%2F)
before being able to contribute a note or feedback.