Skip to content

Instantly share code, notes, and snippets.

@landru247
Created April 8, 2014 20:13
Show Gist options
  • Save landru247/10184151 to your computer and use it in GitHub Desktop.
Save landru247/10184151 to your computer and use it in GitHub Desktop.
WordPress: Truncate - By character count
<?php echo substr(strip_tags($post->post_content), 0, 400);?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment