Title: max character help
Last modified: August 21, 2016

---

# max character help

 *  [gianficaro](https://wordpress.org/support/users/gianficaro/)
 * (@gianficaro)
 * [12 years ago](https://wordpress.org/support/topic/max-character-help/)
 * on the home page i have the max characters limited for design reasons to keep
   everything at a same level design so some post are not longer then others but
   its not counting the white spaces as a character and it makes other posts longer
 * i have this in functions
 * /* set max characters in articles and posts. */
 * function get_excerpt($count){
    $permalink = get_permalink($post->ID); $excerpt
   = get_the_content(); $excerpt = strip_tags($excerpt); $excerpt = substr($excerpt,
   0, $count); $excerpt = substr($excerpt, 0, strripos($excerpt, ” “));
 *  return $excerpt;
    }
 * and this in index
 * <?php echo get_excerpt(250); ?>

The topic ‘max character help’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [gianficaro](https://wordpress.org/support/users/gianficaro/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/max-character-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
