Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add Custom Title
- function short_title($after = '', $length) {
- $mytitle = get_the_title();
- if ( strlen($mytitle) > $length ) {
- $mytitle = substr($mytitle,0,$length);
- echo $mytitle . $after;
- } else {
- echo $mytitle;
- }
- }
- <?php short_title('...', 40); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement