the_title WordPress Filter Hook

The the_title hook is one of the most important hooks in WordPress. It is used to display the title of a post or page. The hook can be used in a number of ways, but most commonly it is used to add a custom title to a post or page.

apply_filters( 'the_title', string $title, int $id ) #

Filters the post title.


Parameters

$title

(string)The post title.

$id

(int)The post ID.


Top ↑

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.


Top ↑

Source

File: wp-includes/post-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.