Created
August 3, 2012 15:43
-
-
Save ashfame/3248853 to your computer and use it in GitHub Desktop.
Modifying page title using the_title filter in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vvvvv