Created
March 27, 2012 12:53
-
-
Save markoheijnen/2215557 to your computer and use it in GitHub Desktop.
Create span on last character of WordPress title
This file contains 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 | |
$string = get_the_title(); | |
$last_character = $string[ strlen( $string ) - 1 ]; | |
echo substr( $string, 0, -1 ) . '<span>' . $last_character . '</span>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment