WordPress filter hook · part of WordPress core
single_post_title
A WordPress core filter that 21 plugins also fire themselves, running on 1.2M+ sites between them.
“Filters the page title for a single post.”
How to use single_post_title
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'single_post_title', function( $post_title, $post ) {
// Change $post_title here.
return $post_title;
}, 10, 2 );Argument names come from The SEO Framework's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
21 plugins that fire single_post_title
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
GTM4WP700,000+ installs
apply_filters( 'single_post_title', $_master_post->post_title, $_master_post )src/Modules/PageVariables/PageVariablesModule.php:399 -
The SEO Framework200,000+ installs
apply_filters( 'single_post_title', $post->post_title, $post )inc/classes/meta/title.class.php:629 -
BuddyPress90,000+ installs
apply_filters( 'single_post_title', $oembed->title )bp-activity/bp-activity-embeds.php:282 -
Kubio AI Page Builder80,000+ installs
apply_filters( 'single_post_title', $post->post_title, $post )build/block-library/blocks/page-title/index.php:121 -
Colibri Page Builder80,000+ installs
apply_filters( 'single_post_title', $post->post_title, $post )extend-builder/shortcodes/colibri_page_title.php:123 -
SEO Ultimate10,000+ installs
apply_filters( 'single_post_title', $post->post_title, $post )modules/opengraph/opengraph.php:117 -
iConvert Promoter2,000+ installs
apply_filters( 'single_post_title', $post->post_title, $post )lib/kubio/lib/api/get-page-title.php:116 -
SEOKEY1,000+ installs
apply_filters( 'single_post_title', get_the_title( $ID ), $post )common/seo-key-helpers-metas.php:55 -
Visibility700+ installs
apply_filters( 'single_post_title', $post->post_title, $post )includes/class-title-template.php:764 -
SEOLAT Tool Plus100+ installs
apply_filters( 'single_post_title', $post->post_title, $post )modules/titles/titles.php:179 -
Vibe SEO Pack70+ installs
apply_filters( 'single_post_title', $post->post_title )lib/functions.php:138 -
Premium Seo Pack20+ installs
apply_filters( 'single_post_title', $__post->post_title )modules/seo_friendly_images/init.php:456 -
MCP Connector for wp2ai20+ installs
apply_filters( 'single_post_title', (string) $post->post_title, $post )includes/class-wp2ai-rest-api.php:15550 -
Blocksolid Snippets20+ installs
apply_filters( 'single_post_title', $the_post_to_find->post_content )blocksolid-snippets.php:203 -
WebMFT: Plugin SEO useful10+ installs
apply_filters( 'single_post_title', $post->post_title, $post )class.WebMFT_SEO.php:769 -
Bye Maridjan10+ installs
apply_filters( 'single_post_title', $post->post_title )bye_maridjan.php:159 -
Voce SEO10+ installs
apply_filters( 'single_post_title', $vseo_meta[ 'title' ], $queried_object )voce-seo.php:86 -
EasyRanklyFewer than 10 installs
apply_filters( 'single_post_title', $post->post_title, $post )src/Titles/Template.php:147 -
WPLibFewer than 10 installs
apply_filters( 'single_post_title', $post_title, $post_item->post(), $post_item )includes/class-theme-base.php:1443 -
Anand Bajrangi SEOFewer than 10 installs
apply_filters( 'single_post_title', $post->post_title, $post )src/Breadcrumbs/TrailBuilder.php:128 -
Ecommerce Smart SurveyFewer than 10 installs
apply_filters( 'single_post_title', $_POST['list_name'] )app/controllers/ajax_update_listing.php:146
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.