Limit the number of characters displayed in title

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <?php $title = the_title('','',FALSE); echo substr($title, 0, 20); if (strlen($title) >20){ echo '&hellip;'; } ?>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.