Skip to content

Instantly share code, notes, and snippets.

@CEscorcio
Created September 10, 2013 07:58
Show Gist options
  • Save CEscorcio/6506312 to your computer and use it in GitHub Desktop.
Save CEscorcio/6506312 to your computer and use it in GitHub Desktop.
Limit first 100 letters in post instead the default the_excerpt lenght
<?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