How To Set Minimum Comment Length In WordPress

Don’t you hate when you write a length post with a lot of content and all the comments on your posts are just couple of words long with the backlink to their website? I hate it, as some people just comment just to get a link back to their own website. Their comments will not be much long, and will consist things like “nice post”, “thanks”, “you’re awesome” and all the crappy little words.

Or if you’re running an e-commerce website or a website with reviews or support, it would be a nice idea to set a minimum comment length of your WordPress comments. People with fewer letters than minimum setting will get an error message and will be requested to make their comment more length.

Just add following snippet to your current theme’s functions.php file:

Replace 20 in the above code with your custom value.