Title: Specified comment length
Last modified: August 22, 2016

---

# Specified comment length

 *  [ink9](https://wordpress.org/support/users/ink9/)
 * (@ink9)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/specified-comment-length/)
 * Hello,
 * Thank You for your plugin…
 * But I’m just wondering if it’s possible to set maximum comment length with this
   plugin?
 * [https://wordpress.org/plugins/short-comment-filter/](https://wordpress.org/plugins/short-comment-filter/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Will Anderson](https://wordpress.org/support/users/itsananderson/)
 * (@itsananderson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206273)
 * Hi. This plugin doesn’t support setting a maximum comment length, but that’s 
   a good idea. I’ll look into adding it.
 *  Thread Starter [ink9](https://wordpress.org/support/users/ink9/)
 * (@ink9)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206276)
 * Thank You for considering this…
 * I think it makes more sense to be able to limit comment character length.
 *  Thread Starter [ink9](https://wordpress.org/support/users/ink9/)
 * (@ink9)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206310)
 * I found this code to limit the character length, it works , but I dont know how
   to add the modal box, that appear automatically when comment is more that 300
   characters. I mean the modal box effect your short comment filter have.
 *     ```
       add_filter( 'preprocess_comment', 'maximum_comment_length' );
   
       function maximum_comment_length( $commentdata ) {
       	$maximumCommentLength = 300;
   
       	if ( strlen( trim( $commentdata['comment_content'] ) ) > $maximumCommentLength )
               {
       		wp_die( 'Sorry your comment is more than ' . $maximumCommentLength . ' characters long on this Site.' );
              }
       	return $commentdata;
       }
       ```
   
 * Please I do really need help.
 *  Thread Starter [ink9](https://wordpress.org/support/users/ink9/)
 * (@ink9)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206311)
 *  Thread Starter [ink9](https://wordpress.org/support/users/ink9/)
 * (@ink9)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206312)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Specified comment length’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/short-comment-filter.svg)
 * [Short Comment Filter](https://wordpress.org/plugins/short-comment-filter/)
 * [Support Threads](https://wordpress.org/support/plugin/short-comment-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/short-comment-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/short-comment-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/short-comment-filter/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [ink9](https://wordpress.org/support/users/ink9/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/specified-comment-length/#post-5206312)
 * Status: not resolved