How to Display Word Count in WordPress

How to Display Word Count in WordPress

WordPress word count is important if you own a website on which you publish content regularly.

In the quickly evolving digital space, content creation has become a very important component for most online businesses.

But how do you display word count on WordPress?

You can display word count in pages, posts, and the WordPress All Posts menu using plugins and custom code.

In this article, we will show you how to view and display Word count on your WordPress post and pages.

In this Article:

 

Display Word Count in WordPress Editor

You can check word count on your WordPress posts and pages without installing any plugin. The word count feature is available on both the classic and the block editor on WordPress.

Display Word Count in the Classic Editor

Displaying word counts with the WordPress classic editor is simple and straightforward.

First, you need to navigate to Posts >> Add New to create a new post. Next, type in your post content.

After that, you can find your word count in the bottom left corner of your page as shown below.

Add new posts page - WordPress word count

Next, to display word count in pages in the classic editor, navigate to Pages >> Add New to create a new page. You can now find your word count displayed in the bottom left corner of the page.

 

Note: You can also use these steps to view word count on previously created posts and pages by opening them in the classic editor.

Display word count in pages

Using the Block (Gutenberg) Editor

WordPress made Gutenberg the default word editor for all its posts and pages after the WordPress 5.0 update.

As a result, tracking word count on this editor may be a bit tricky for new users.

So to display word count on the Gutenberg editor (WordPress default editor), navigate to Posts >> Add New and create a post.

Create a new post

Side note: You can simply click on All Posts if you want to check and display the word count for an existing post.

 

Next, click on the triple bar icon.

Triple bar icon

Click on Outline. You can now find a short summary of your post showing the word count, characters, and time to read.

Outline showing summary of post

Display Word Count in WordPress Admin Area

You can display word count in the WordPress admin area using a plugin. This would give you detailed word count statistics of your posts. You can also display word count on the ‘all posts’ menu. We will show you how to do that below.

Using the WP Word Count Plugin

The WP Word Count plugin offers an easy way to get detailed statistics. It is useful when you need to view word count statistics for a specific author, a particular post type, or even your whole website.

WP Word Count plugin

Below, we will show you how to install and activate the WP Word Count plugin to display detailed word count statistics for your website.

First, navigate to Plugins >> Add New. Next, enter ‘WP word count’ into the search bar and hit Enter.

The plugin should appear on the search result. Click on Install Now to Install it and then activate it to enable the plugin.

Install and activate plugin

You can now find the plugin on the left sidebar of your WordPress dashboard. Click on it and then click on Statistics. To get your word count statistics, click on Calculate.

Click on calculate link

To get your word count totals, click on Calculate Word Counts.

Click calculate word counts

After that, your website’s word count will be analyzed. You can now return to the statistics page to view detailed content statistics of your website.

WP Word Count statistics page

Use the WP Word Count plugin to display all your site’s word count, monthly statistics, and reading time. You can also use it to display word count by author.

To do this, switch to the ‘Author Statistics’ tab.

This will help you look up author-specific word counts on your website.

Author Statistics tab

As you add new posts and pages to your website, WP Word Count keeps calculating your numbers by default. So you won’t need to click the “calculate” link to see the most recent word count stats.

Display Word Count Stats in All Posts Menu with Code

You can also add word counts to each post on your WordPress all-posts menu. This way, you don’t need to open a post before you view the word count.

First copy the code below:

//Word count Code begins

// Add custom column header for word count
function custom_posts_column_head($columns) {
    $columns['word_count'] = 'Word Count';
    return $columns;
}
add_filter('manage_posts_columns', 'custom_posts_column_head');

// Add custom column content for word count
function custom_posts_column_content($column_name, $post_id) {
    if ($column_name === 'word_count') {
        $content = get_post_field('post_content', $post_id);
        $word_count = str_word_count(strip_tags($content));
        echo $word_count;
    }
}
add_action('manage_posts_custom_column', 'custom_posts_column_content', 10, 2);

// Make the new column sortable
function custom_posts_column_sortable($columns) {
    $columns['word_count'] = 'word_count';
    return $columns;
}
add_filter('manage_edit-post_sortable_columns', 'custom_posts_column_sortable');

//Word Count Code ends

Next, go to Appearance >> Theme File Editor. After that, click on functions.php under theme functions.

Themes file editor - WordPress word count

Scroll down and add your code at the bottom. Click on the Update File to save.

Manually display WordPress word count

A new column for word counts will be added to the ‘all posts’ menu. Therefore, you can easily check the word count of each post without opening it.

All Posts menu

How to Set Word Count Limit

If your website has many authors, then establishing a minimum and maximum word count can be beneficial. It can help you ensure that each author complies with your WordPress content standards and addresses all the reader’s issues.

The PublishPress Checklists plugin with more than 100k active installations offers an easy way to add a minimum word count limit to your WordPress website.

With PublishPress Checklists, you can specify conditions that authors meet before publishing content. And these include minimum and maximum word counts for posts and pages.

To use the Publish Press plugin, navigate to Plugins >> Add New and search for the plugin. Click Install Now to install the plugin and then activate it.

Install and activate plugin

Next, navigate to ‘Checklists’ from the WordPress admin panel.

WP Admin panel

Here, you can configure the publishing checklists for your content.

Select ‘required’ to make the word count checklist compulsory. Set who can ignore the requirement (Editor or Admin), and then the minimum and maximum word count.

Configure the publishing checklists - WordPress word count

Scroll down and click on Save Changes.

Save changes - WordPress word count

You can now write a new blog post to confirm if the word count requirement works. Go to Posts >> Add New.

Add new posts

The ‘Publish’ button in the WordPress editor thereupon displays a warning icon if the post doesn’t have the required total number of words.

Warning icon on Publish button

Also, the plugin will show in the “Checklist” settings box that the word count limit wasn’t achieved.

Checklist settings box

On the other hand, the checklist box will display a green tick if your articles in WordPress reach the required word count. At this point, authors will be able to publish the blog post.

Publish blog post - WordPress word count

So, with the PublishPress plugin installed, you can now control the word counts for posts on your WordPress blog.

Conclusion

As a website owner, it’s important to ensure that you’re delivering maximum quality with your website content and are reaching a wide audience. One way to do this is by monitoring word count.

This post has provided you with the steps you need to display word count on your posts and pages. We have also shown you how to set a word count requirement on WordPress sites.

Beyond monitoring your word count, you should also ensure your blog content is relevant and your images are well-optimized. This, subsequently, will help improve your site’s ranking and domain authority.

 This post was written by Mesheal Fegor

Mesheal Fegor is a Web/WordPress Developer and technical writer. His WordPress help articles have been featured on Kinsta and other sites. Mesheal holds a master's degree in computer science. His writing focuses on technical WordPress issues, ranging from core WordPress problems, to issues with WooCommerce, and more.

Last edited by: FixRunner Team