Connect with us

Wordpress Plugins

WordPress Code: Post Word Count Progress Bar

When it comes to writing great content, word count is not the biggest factor. At the same time, you don’t want to have posts that are too short or long. The good news is you can write PHP and JavaScript code to track word count in your posts or pages in real-time.

🖖 KnownHost: super reliable Dedicated, VPS, Cloud & Shared hosting for WordPress, online communities & social networks

This function enqueues a JavaScript file that monitors your block editor’s content. It calculate the word count by splitting the text into words and filtering out empty strings. A progress bar and an info label are dynamically added to the editor sidebar. Here is the JavaScript function you need:

 

Continue Reading
You may want to check out:
*some of our articles and lists include affiliate links to fund our operations (e.g. Amazon, Elegant Themes, Envato). Please read our disclaimer on how we fund Exxponent.
You may also like...
Click to comment

Leave a Reply

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

More in Wordpress Plugins

To Top