Last active
December 17, 2015 20:09
-
-
Save lswilson/5665875 to your computer and use it in GitHub Desktop.
Shorten title UTF8 (useful for cyrillic languages)
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
//display only first 45 characters in the title. | |
$short_title = mb_substr(the_title('','',FALSE),0, 45); | |
echo $short_title; | |
if (strlen( utf8_decode($short_title) ) > 44){ | |
echo '...'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment