W3cubDocs

/WordPress

apply_filters( ‘the_title’, string $post_title, int $post_id )

Filters the post title.

Parameters

$post_titlestring
The post title.
$post_idint
The post ID.

More Information

the_title is a filter applied to the post title retrieved from the database, prior to printing on the screen. In some cases (such as when the_title is used), the title can be suppressed by returning a false value (e.g. NULL, FALSE or the empty string) from the filter function.

Source

return apply_filters( 'the_title', $post_title, $post_id );

Changelog

Version Description
0.71 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/the_title