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:

functions.php
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.

  1. GTM4WP icon GTM4WP700,000+ installs apply_filters( 'single_post_title', $_master_post->post_title, $_master_post ) src/Modules/PageVariables/PageVariablesModule.php:399
  2. The SEO Framework icon The SEO Framework200,000+ installs apply_filters( 'single_post_title', $post->post_title, $post ) inc/classes/meta/title.class.php:629
  3. BuddyPress icon BuddyPress90,000+ installs apply_filters( 'single_post_title', $oembed->title ) bp-activity/bp-activity-embeds.php:282
  4. Kubio AI Page Builder icon Kubio AI Page Builder80,000+ installs apply_filters( 'single_post_title', $post->post_title, $post ) build/block-library/blocks/page-title/index.php:121
  5. Colibri Page Builder icon Colibri Page Builder80,000+ installs apply_filters( 'single_post_title', $post->post_title, $post ) extend-builder/shortcodes/colibri_page_title.php:123
  6. SEO Ultimate icon SEO Ultimate10,000+ installs apply_filters( 'single_post_title', $post->post_title, $post ) modules/opengraph/opengraph.php:117
  7. iConvert Promoter icon iConvert Promoter2,000+ installs apply_filters( 'single_post_title', $post->post_title, $post ) lib/kubio/lib/api/get-page-title.php:116
  8. SEOKEY icon SEOKEY1,000+ installs apply_filters( 'single_post_title', get_the_title( $ID ), $post ) common/seo-key-helpers-metas.php:55
  9. Visibility icon Visibility700+ installs apply_filters( 'single_post_title', $post->post_title, $post ) includes/class-title-template.php:764
  10. SEOLAT Tool Plus icon SEOLAT Tool Plus100+ installs apply_filters( 'single_post_title', $post->post_title, $post ) modules/titles/titles.php:179
  11. Vibe SEO Pack icon Vibe SEO Pack70+ installs apply_filters( 'single_post_title', $post->post_title ) lib/functions.php:138
  12. Premium Seo Pack icon Premium Seo Pack20+ installs apply_filters( 'single_post_title', $__post->post_title ) modules/seo_friendly_images/init.php:456
  13. MCP Connector for wp2ai icon MCP Connector for wp2ai20+ installs apply_filters( 'single_post_title', (string) $post->post_title, $post ) includes/class-wp2ai-rest-api.php:15550
  14. Blocksolid Snippets icon Blocksolid Snippets20+ installs apply_filters( 'single_post_title', $the_post_to_find->post_content ) blocksolid-snippets.php:203
  15. WebMFT: Plugin SEO useful icon WebMFT: Plugin SEO useful10+ installs apply_filters( 'single_post_title', $post->post_title, $post ) class.WebMFT_SEO.php:769
  16. Bye Maridjan icon Bye Maridjan10+ installs apply_filters( 'single_post_title', $post->post_title ) bye_maridjan.php:159
  17. Voce SEO icon Voce SEO10+ installs apply_filters( 'single_post_title', $vseo_meta[ 'title' ], $queried_object ) voce-seo.php:86
  18. EasyRankly icon EasyRanklyFewer than 10 installs apply_filters( 'single_post_title', $post->post_title, $post ) src/Titles/Template.php:147
  19. WPLib icon WPLibFewer than 10 installs apply_filters( 'single_post_title', $post_title, $post_item->post(), $post_item ) includes/class-theme-base.php:1443
  20. Anand Bajrangi SEO icon Anand Bajrangi SEOFewer than 10 installs apply_filters( 'single_post_title', $post->post_title, $post ) src/Breadcrumbs/TrailBuilder.php:128
  21. Ecommerce Smart Survey icon 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.