Skip to content

Instantly share code, notes, and snippets.

@ashfame
Created August 3, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashfame/3248853 to your computer and use it in GitHub Desktop.
Save ashfame/3248853 to your computer and use it in GitHub Desktop.
Modifying page title using the_title filter in WordPress
<?php
add_filter( 'the_title', 'nine11day_modify_post_title' );
function nine11day_modify_post_title( $title ) {
if ( is_page() && in_the_loop() && $title == 'Existing Title' )
$title = '<span>Existing</span> Title';
return $title;
}
@Nuriman2
Copy link

vvvvv

@madurapa
Copy link

madurapa commented Jul 3, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment