Created
September 10, 2013 07:58
-
-
Save CEscorcio/6506312 to your computer and use it in GitHub Desktop.
Limit first 100 letters in post instead the default the_excerpt lenght
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = $post->post_content; | |
$newString = substr($string, 0, 100); | |
echo $newString; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment