58

Limit WordPress Title and Excerpt Characters The Shortest Way

This simple tutorial is about Limit WordPress Title and Excerpt.
Following are two simple line of codes that you can use for showing limited number of characters in title and excerpt.

The Title

This code will limit the title to 30 characters, you can change the value to increase or decrees the limit

< ?php echo substr(the_title'', '', FALSE, 0, 30); ?>

The Exceprt

This code will limit the excerpt to 200 characters, you can change the value to your needs

 < ?php echo substr(get_the_excerpt, 0,200); ?>