How to Set Minimum Word Count for WordPress Posts

Would you like to set a word count for your WordPress blog entries? If you have different authors on your site, then setting up a minimum word count can assist with guaranteeing that journalists fulfill content guidelines and completely answer the reader’s inquiries.

In this article, we’ll show you how to set a minimum word count for your WordPress posts.

Why Set a Minimum Word Count for Your Blog Posts?

Regardless of whether you’re creating content yourself or run a multi-author site, you should set certain substance standards to guarantee top-quality articles.

Read More: How to Automatically Post to Facebook From WordPress

One of the standards you can present is a minimum word count for each WordPress blog entry. With WordPress, you can limit authors from distributing blog entries with slender substance and guarantee high substance quality.

For what reason would you want to enforce longer posts?

Some research proposes that more drawn-out content will in general rank significantly preferred in search results over short substance, which could assist you with getting more traffic to your blog.

That being said, how about we take a gander at how you can set a minimum word count in a WordPress blog.

Method 1: Set a Minimum Word Count Using a Plugin

A straightforward way to add a minimum word count to your WordPress site is by using a plugin like PublishPress Checklists.

PublishPress Checklists allow you to set tasks that authors should finish before distributing content. This incorporates adding a minimum and maximum word count on posts and pages.

For this tutorial, you can use the free form of PublishPress Checklists, since it has the features we need. There’s also an exceptional variant available that offers more features like agendas for WooCommerce items.

Also see: WordPress: Show the date of the last post update

To begin with, you’ll need to install and activate the PublishPress Checklists plugin.

Upon activation, you’ll need to go to Checklists from your WordPress admin panel. Then, you can set minimum and maximum words for the ‘Number of words in content‘ option.

After that, you can pick whether you want to make the ‘Number of words in content‘ option be disabled, required, or suggested task from the dropdown menu.

If you select Recommended, then authors can distribute articles regardless of whether they don’t meet the minimum word count. However, the Required option makes it mandatory to finish the word count task, so feel free to choose the Required option.

Other than that, PublishPress Checklists also allows you to add user jobs to avoid meeting the word count necessity. Basically, click on the container under the ‘Who can ignore the task‘ segment and select a user job.

At the point when you’ve set the number of words, authors ought to finish, basically look down and click the ‘Save Changes‘ button.

Now you can go to Posts > Add New to create another blog entry and see the minimum word count prerequisite in real life.

If the post doesn’t contain the minimum number of words, a warning symbol will appear on the ‘Distribute’ button in the WordPress editor. The plugin will also show that the word count task wasn’t met in the ‘Checklist’ settings box to your right side.

When your substance meets the minimum word count, the agenda task will show a green checkmark, and authors can distribute the blog entry.

Method 2: Manually Set a Minimum Word Count Limit

Another way to add a minimum word count on your WordPress site is by adding a code scrap to the functions.php files in a WordPress subject.

However, we don’t suggest altering your site’s topic files. That’s because even a small mistake can break your site and even keep you from accessing the WordPress dashboard.

An easier way to add code to your site is by using the Code Snippets plugin. It allows you to add custom code without agonizing over breaking your site. Besides, it makes it easier to monitor any pieces you add to your site.

To start with, you’ll need to install and activate the Code Snippets plugin.

Once the plugin is active, basically head over to Snippets > Add New from your WordPress dashboard. You can start by adding a title for your custom code.

Now, you’ll need to copy the accompanying code:

function minWord($content)
{
global $post;
$content = $post->post_content;
if (str_word_count($content) < 100 ) //set this to the minimum number of words
wp_die( __('Error: your post is below the minimum word count. It needs to be longer than 100 words.') );
}
add_action('publish_post', 'minWord');

Note: You may change the minimum number of words from 100 to whatever you like and also customize the mistake to make it supportive. Make sure to change the number in the two places in the code bits.

Then, just paste the duplicated code in your new bit under the ‘Code’ area and then click the ‘Save Changes’ and ‘Activate’ buttons.

Now, if you attempt to distribute a blog entry that’s beneath the word count limit (100 words in our example), then you’ll see a distributing mistake.

We trust this article assisted you with learning how to set a minimum word count for a WordPress blog. You

Leave a comment

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