//limit title() function limit_title(){ $tit = the_title('','',FALSE); $tit2 = explode(" ", $tit); $count = count($tit2); if($count >=6){ for ($i=0;$i<=6;$i++){ echo $tit2[$i],' '; } echo '...'; }else echo $tit; }