Posted By

jacksaidwhat on 05/08/11


Tagged

wordpress


Versions (?)

Custom WordPress Title Length


 / Published in: PHP
 

Must be used in the loop.

  1. // Replace 34 with the number of characters to display.
  2.  
  3. <?php
  4. $title = the_title('','',FALSE);
  5. echo substr($title, 0,34);
  6. if (strlen($title) > 34) echo "...";
  7. ?>

Report this snippet  

You need to login to post a comment.