Last active
February 16, 2016 02:33
-
-
Save txid0x7f/bc2eeec92500ce8817f1 to your computer and use it in GitHub Desktop.
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
function trim_title_chars($count, $after) { | |
$title = get_the_title(); | |
if (mb_strlen($title) > $count) $title = mb_substr($title, 0, $count); | |
else $after = ''; | |
echo $title . $after; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment