Suppose you are the owner of a multi-author WordPress blog and you want to set a minimum word count for each blog posted by your author. So bloggers won’t be able to post short blog posts.
Here is a tutorial on how to set a minimum word count for WordPress blog. Once the word count is set, an error will be displayed when a blogger tries to publish a blog shorter than the minimum word count.
Go to Dashboard > Appearance > Editor, open functions.php file and copy-paste the following code:
1 2 3 4 5 6 7 8 9 10 | <? function minWordCount($content) { global $post; $content = $post->post_content; if (str_word_count($content) < 100 ) //the minimum number of words wp_die( __('Oops: your post is below the minimum word count. It needs to be at least 100 words or more.') ); } add_action('publish_post', 'minWordCount'); ?> |
You have set the minimum word count to 100 words. You can change both the word count and the warning according to your blog standards.
Jinnat Ul Hasan
DO YOU NEED OUR HELP?
Contact our experts, most of the time we assist our readers free of charge.Those who found this page were searching for:
- how to increase post word count in post for wordpress admin
- what is minimum word count for blog posts
- how to ccount words for a blog
- word count in wordpress post
- multi author wordpress
- minimum word count wordpress
- homepage content minimum words
- word count wordpress
- words minimum wordpress comments
- set minimum word wordpress




