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 = substr( $title, 0, $length );
    }

    if ( strlen($title)> 0 ) {
        $title = apply_filters('the_titlesmall', $before . $title . $after, $before, $after);
        if ( $echo )
            echo $title;
        else
            return $title;
    }

}