Prevent authors from publishing too short content

Sometime we have a website that authors can sign up to and write articles as a guest author and publish their golden words. However we don’t want low quality posts submitted. So, If we want the posts to be not empty and to be longer than 250 words just suppose some number of words. In this situation how WordPress can help us to achieve this functionality. As I said in my other articles that WordPress is very rich CMS and its allow is to do any thing we need just name it and we can prevent authors from publishing short content with the help of few functions.

Wordpress content editor
  • Facebook
  • Twitter
  • Google+
  • LinkedIn
  • Pinterest

WordPress content editor

Using Short

Here’s one idea using a custom post status, for example short:

We can then view all posts with too short content here:

Extra filter Tab for short content posts

Extra Tab filter for short content posts
  • Facebook
  • Twitter
  • Google+
  • LinkedIn
  • Pinterest

Extra Tab filter for short content posts

To prevent authors from publishing posts with too short content, we can use the wp_insert_post_data filter:

where we force the post status back to short on publish. We can use this to warn the user that the content is too short:

Here’s a screenshot of the warning:

Warning if post have less than 250 words
  • Facebook
  • Twitter
  • Google+
  • LinkedIn
  • Pinterest

Warning if post have less than 250 words

You can modify this to your needs, for example if you need this for other post types than post.

Web consultant and Web Designer with over 7 years of professional and creative experience. Jamil is passionate about creating modern and user friendly websites that help businesses attract more customers and increase sales. He received bachelor and master in Business Administration and also co-founder of www.prepareddevelopment.com

Pin It on Pinterest

Share This