Shorten the title length
Try this. First check if the original string length is less than or equal to passed in length, and if so, we ignore the $after parameter : function the_titlesmall($before=””, $after=””, $echo = true, $length = false) { $title = get_the_title(); if( strlen($title) <= $length ) $after=””; if ( $length && is_numeric($length) ) { $title = … Read more