How to customize the minimum word count for an article in WordPress

Many WordPress website owners employ several writers to add content, but sometimes there are some who want their site content to be of a certain length and fit with the goals set by them. Of course, WordPress does not provide the feature of limiting the number of words for the content.

Through this article, we will learn how to customize the minimum number of words in WordPress through plugins and manually. 


How to allocate a minimum word count

The length of the content plays a major role in improving the site’s appearance in search engines. In addition, long content is rich in information that benefits the visitor and addresses all aspects of the topic. It is worth noting that there are some SEO plugins that specify the minimum number of articles, such as the Yoast SEO plugin .

But this will certainly not be compatible with what you actually want, and in the following lines we will learn how to determine the appropriate word count for your articles: 

Setting a minimum word limit on WordPress using plugins 

There are a bunch of plugins that enable you to do this, and PublishPress Checklists is one of them. It comes with multiple features regarding managing content on the site. In addition to determining the appropriate number of words, we find that it sets some standards, such as adding a picture to the article, approving the article by one of the users before publishing it, or the number of internal and external links, and other tasks.

In order to be able to use the PublishPress Checklists plugin to determine the number of words in WordPress, you must first install it, by going to the WordPress Control Panel > Plugins > Add New.

Then search for the extension by entering its name in the top search field. Select it and click Install then Activate. 

After activating the plugin, you can now start customizing the minimum number of words in WordPress, and you will find that a special icon has been added to the right menu of the control panel called Checklists. Just tap on it to enter Settings, and then scroll down.

 And under the Number of words in content option. Select the order status from three options: required, meaning that the order is mandatory, or recommended, in the case that the order is only recommended, which means that writers have the ability to publish articles even if the article does not meet the specified word count, and Disabled to stop the order.

It is also possible to exclude some users from these commands in the Who can ignore the task section. 

In the options section, set the minimum and maximum number of words you want. Then scroll down and click Save Changes. 

Now, when writing any article on the site, you will find that there is a red exclamation mark on the publish button at the top, in addition to indicating the minimum words on the left side of the screen. It is worth noting that the article cannot be published unless these requirements are met. 

The PublishPress Checklists add-on offers a paid version, through which it provides additional features of updates and customization of the minimum content of online stores. And adjusting the borders of images, in addition to technical support, and removing the add-on branding and advertisements. But without major differences between the paid and free version, and you can view them here . 

Manually customize the minimum word count in WordPress

If you do not want to use add-ons, there is also an option that enables you to manually customize the number of words by adding some codes to the site files, but keep in mind that if you do not have sufficient experience, you should not start doing this; Because the slightest mistake will stop your website from working, and here is how to do that: 

First, you’ll need to go to your WordPress dashboard, click Appearance > Theme Editor, and from the Files sidebar, click the functions.php file or Theme Properties. 

Add the following code to the end of the file, and click Update File. 

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’);

Thus, you have set the minimum number of words in WordPress, and an alert will appear at the top indicating that the publishing process will fail if it is less than the specified limit.

If you want to change the number of words, you can do so by modifying the number in the code.

These are the two methods that can be used to customize the number of words in WordPress. It is worth noting that the number of words is not one of the influential aspects when it comes to writing content that is compatible with search engines , but what is more important is providing value to the reader and giving the topic its due right in writing.

If the article is long and without any rich information (filling), you will certainly find that the traffic rate decreases, and vice versa if the content is limited and provides benefit to the visitor. 

Avatar photo
I am a young man who has been working in WordPress and e-marketing for 10 years. I would like to share my experience with you so that we can become professional in WordPress I will be happy to share the experience with you.