How to add a Character Counter to Excerpt box

How to add a Character Counter to Excerpt box

Many themes have a specific requirement for how long excerpts should be. If you want your excerpts to display nicely without being cut off mid-sentence, having a character counter allows you to ensure your excerpt length is under a certain number of characters.

For Setting Character Limit in line 12, Green text turns red after hitting 100 characters

Add below snippet to your functions.php or create your own plugin for it if you prefer.

How to add a Character Counter to Excerpt box

Credit:
http://wpsnipp.com/index.php/excerpt/add-a-character-counter-to-excerpt-metabox/
https://gist.github.com/ellm/09900a5f43ba872419f7

Save

Author: Leo

My name is Leo who's behind this blog. I've been working with wordpress since 2010. I'll write about themes, plugins, tutorials and all about wordpress here. Hope you find it useful!

Leave a Reply

Your email address will not be published. Required fields are marked *