single_post_title WordPress Filter Hook

The single_post_title hook is a great way to change the title of your post on the single post page. This can be useful if you want to change the title based on the content of the post, or if you want to add some extra information to the title.

apply_filters( 'single_post_title', string $_post_title, WP_Post $_post ) #

Filters the page title for a single post.


Parameters

$_post_title

(string)The single post page title.

$_post

(WP_Post)The current post.


Top ↑

Source

File: wp-includes/general-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.

Show More
Show More